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 176999 - NullPointerException at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.variableClashes
Summary: NullPointerException at org.netbeans.modules.javafx.refactoring.impl.plugins....
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-17 07:40 UTC by Alexandr Scherbatiy
Modified: 2009-11-24 08:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 162302


Attachments
stacktrace (2.30 KB, text/plain)
2009-11-17 07:40 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-11-17 07:40:47 UTC
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)
Comment 1 Alexandr Scherbatiy 2009-11-17 07:40:51 UTC
Created attachment 91175 [details]
stacktrace
Comment 2 J Bachorik 2009-11-17 07:57:52 UTC
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
Comment 3 J Bachorik 2009-11-21 09:59:19 UTC
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.
Comment 4 J Bachorik 2009-11-23 01:25:52 UTC
fixed in trunk http://hg.netbeans.org/javafx/rev/800f026597b9 (before cloning)
Comment 5 J Bachorik 2009-11-23 01:26:35 UTC
setting the status
Comment 6 pribyl 2009-11-24 06:52:16 UTC
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
Comment 7 Alexandr Scherbatiy 2009-11-24 07:55:08 UTC
verified with custom build with the fixes
Comment 8 Karol Harezlak 2009-11-24 08:31:38 UTC
Changeset:  http://hg.netbeans.org/javafx/rev/800f026597b9

Code reviewed.