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.
Build: NetBeans IDE Dev (Build 200911170201) VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03 OS: Windows XP, 5.1, x86 User Comments: sunflower: - Copy the code to the editor: ------------------------------------- var seq = [ 1,2,3,4,5]; var subseq = seq[ n | n < 3]; ------------------------------------- - Select the 'n' in the 'seq[ n | n < 3]' expression, right-click and select Refactor->Rename - Delete the 'n' name from the text filed on the Rename dialog The exception pops up Stacktrace: java.lang.NullPointerException at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.variableClashes(RenameRefactoringPlugin.java:463) at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.fastCheckParameters(RenameRefactoringPlugin.java:241) at org.netbeans.modules.javafx.refactoring.impl.plugins.JavaFXRefactoringPlugin$3.check(JavaFXRefactoringPlugin.java:79) at org.netbeans.modules.javafx.refactoring.impl.plugins.JavaFXRefactoringPlugin$4.run(JavaFXRefactoringPlugin.java:149) at org.netbeans.modules.javafx.refactoring.impl.plugins.JavaFXRefactoringPlugin$4.run(JavaFXRefactoringPlugin.java:147) at org.netbeans.modules.javafx.source.parsing.LegacyUserTask.run(LegacyUserTask.java:68)
Created attachment 91175 [details] stacktrace
Somehow the scope of the sequence variable is null ... added few checks preventing the NPE in such situations. I am having the fix ready but it will not probably be integrated into 6.8
I will increase the priority to P1 as the user is presented with an uncaught exception preventing him to use refactoring in some cases completely. If anyone objets, plz, let me know. I will start HR process otherwise.
fixed in trunk http://hg.netbeans.org/javafx/rev/800f026597b9 (before cloning)
setting the status
Product Version: NetBeans IDE 6.8 RC1 (Build 200911222341) Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) Verified
verified with custom build with the fixes
Changeset: http://hg.netbeans.org/javafx/rev/800f026597b9 Code reviewed.