This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 1918

Summary: Renaming a just compiled class created exception.
Product: platform Reporter: Janne Leppanen <jleppanen>
Component: -- Other --Assignee: Janne Leppanen <jleppanen>
Status: CLOSED FIXED    
Severity: normal    
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Janne Leppanen 1999-05-24 18:55:49 UTC
Following exception was thrown after renaming a just compiled class.

Error: "New name is in bad format; Cannot rename HowdieEarth" when I tried to rename
it to HelloWorld after compilation.

After that old files like "H", "HelloYou" were left open in editor though I had only one file which I
was renaming.

Exception occurred in request processor:
java.lang.StringIndexOutOfBoundsException: String index out of range: 241
        at java.lang.String.substring(String.java:1486)
        at com.netbeans.developer.modules.loaders.java.JavaParser$ParserInputStr
eam.getString(JavaParser.java:701)
        at com.netbeans.developer.modules.loaders.java.JavaParser.defineField(Ja
vaParser.java:564)
        at sun.tools.java.Parser.parseField(Parser.java:1722)

        at com.netbeans.developer.modules.loaders.java.JavaParser.parseField(Jav
aParser.java:460)
        at sun.tools.java.Parser.parseClassBody(Parser.java:1938)
        at sun.tools.java.Parser.parseNamedClass(Parser.java:1870)
        at sun.tools.java.Parser.parseClass(Parser.java:1807)
        at com.netbeans.developer.modules.loaders.java.JavaParser.parseClass(Jav
aParser.java:406)
        at sun.tools.java.Parser.parseFile(Parser.java:2035)
        at com.netbeans.developer.modules.loaders.java.JavaParser.parseFile(Java
Parser.java:213)
        at com.netbeans.developer.modules.loaders.java.SourceElementImpl$5.run(S
ourceElementImpl.java:381)
        at com.netbeans.ide.util.Task.run(Task.java:125)
        at com.netbeans.ide.util.RequestProcessor$ProcessorThread.run(RequestPro
cessor.java:379)
Comment 1 Marek Grummich 2000-07-25 09:40:59 UTC
Priority is changed to P4 (normal).