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.
This is 100% reproducible by one of our performance test. Steps test does : - open jEdit project (attached) - invoke Refactor | Rename ... on jEdit.java file -> Rename dialog rises - type jEdit1 - push Refactor button -> StringIndexOutOfBoundsException & NullPointerException rose (see attachment) + asked me to report issue against "java/core" - there is no such component in IZ + ask to attach dump.log file
Created attachment 37400 [details] Exceptions
Created attachment 37402 [details] JEdit project
Created attachment 37403 [details] StatusBar.dump
NetBeans IDE Dev (Build 200701151900) 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 Linux version 2.6.12-10-686 running on i386 en_US (nb); UTF-8
Who asked you to file bug against java/core?
>Who asked you to file bug against java/core? have you read attached exception ? There is a message : "Please report a bug against java/source and attach dump file"
For the SIOOBE see also issue #93280. For the NPE, see issue #91706.
Known problem in generator. Adding Honza to Cc, he'll be interested in Types.rank() NPE.
Most of the problems are known in generator. It is: - switch/case diffing, - fields groups, i.e. int a, b; - enum constants.
Rename in array init. Checking in source/src/org/netbeans/modules/java/source/save/CasualDiff.java; /cvs/java/source/src/org/netbeans/modules/java/source/save/CasualDiff.java,v <-- CasualDiff.java new revision: 1.66; previous revision: 1.65 done
Partial fix. Rename in case statement. Checking in src/org/netbeans/modules/java/source/save/CasualDiff.java; /cvs/java/source/src/org/netbeans/modules/java/source/save/CasualDiff.java,v <-- CasualDiff.java new revision: 1.87; previous revision: 1.86 done
Added testcase. Checking in test/unit/src/org/netbeans/api/java/source/gen/BodyStatementTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/BodyStatementTest.java,v <-- BodyStatementTest.java new revision: 1.23; previous revision: 1.22 done
I made several fixes and also variables separated by comma should be correctly rename. Unfortunately when I tried to reproduce the issue, I've got an exception in RenameTransformer. Reassigning to refactoring and waiting for evalution of the problem. Honzo, when exception will be fixed, reassign it back. java.lang.NullPointerException at org.netbeans.modules.refactoring.java.plugins.RenameTransformer.renameDeclIfMatch(RenameTransformer.java:117) at org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitClass(RenameTransformer.java:97) at org.netbeans.modules.refactoring.java.plugins.RenameTransformer.visitClass(RenameTransformer.java:35) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:596)
Created attachment 45219 [details] NPE from Rename
Element el = workingCopy.getTrees().getElement(path); el is null for path representing class ActionHandler in VFSBrowser.java:1369 I can surely handle null values, but this is bug in java/source imo.
NPE fixed. Checking in RenameTransformer.java; /cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/RenameTransformer.java,v <-- RenameTransformer.java new revision: 1.12; previous revision: 1.11 done Now it throws some more exceptions. See attachment.
Created attachment 45283 [details] Exceptions
I didn't see exceptions in current trunk build, but still there are problems, added test for missing right paren. IDE:------------------------------------------------- IDE: [7/18/07 10:40 AM] Committing "BodyStatementTest.java" started Checking in BodyStatementTest.java; /cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/BodyStatementTest.java,v <-- BodyStatementTest.java new revision: 1.35; previous revision: 1.34 done IDE: [7/18/07 10:40 AM] Committing "BodyStatementTest.java" finished
Checking in org/netbeans/modules/java/source/save/CasualDiff.java; /cvs/java/source/src/org/netbeans/modules/java/source/save/CasualDiff.java,v <-- CasualDiff.java new revision: 1.168; previous revision: 1.167 done
Exceptions are no longer reproducible. Several usages are not renamed, in files VFSBrowser.java SyntaxHiliteOptionPane.java and one more... Seems they are connected with comment written by Honza B. Reassigning to Honza Lahoda.
After the last wave of fixed in the infrastructure, the rename works correctly for me, except for org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java, in which the occurrences of jEdit are not renamed. It seems that the cause is: -the file contains more than one class -all references of jEdit in this file are in "secondary" classes, not in the primary one -the ClassIndex.getReferences does not return org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java as a file that contains references to jEdit I will attach a simple testing project - try to rename "Main" to "Main1" - the references in Auxiliary.java are not renamed.
Created attachment 46798 [details] Simple testing project.
Caused by same root case as #90196, the Index does not handle correctly non public top level classes. *** This issue has been marked as a duplicate of 90196 ***
v/c