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 180137

Summary: Function Refactoring throws NPE: #120577: Cannot resolve ElementHandle[kind=CLASS; sigs=mathematics.multidimensional.shape.MDShape$1MDShape$ObjLit$1 ]; file: null
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: UnsupportedAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 164811
Bug Depends on:    
Bug Blocks: 173077    
Attachments: stacktrace
IDE log file

Description Alexandr Scherbatiy 2010-02-02 03:52:26 UTC
Build: NetBeans IDE Dev (Build 201001280200)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP

User Comments:
sunflower: Steps to reproduce:

- Open the attached project
http://netbeans.org/bugzilla/attachment.cgi?id=93747

- Open the mathematics.multidimensional.MDShape class
- Rfeactor->Rename the getPoints() function

The NPE pops up




Stacktrace: 
java.lang.NullPointerException: #120577: Cannot resolve ElementHandle[kind=CLASS; sigs=mathematics.multidimensional.shape.MDShape$1MDShape$ObjLit$1 ]; file: null
   at org.netbeans.modules.javafx.refactoring.impl.javafxc.SourceUtils.getOverridingMethods(SourceUtils.java:307)
   at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.preCheck(RenameRefactoringPlugin.java:270)
   at org.netbeans.modules.javafx.refactoring.impl.plugins.JavaFXRefactoringPlugin$1.check(JavaFXRefactoringPlugin.java:61)
   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 2010-02-02 03:52:30 UTC
Created attachment 93750 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2010-02-05 02:41:37 UTC
One more case:

- Copy the code to the editor:
------------------------------------------------------
abstract class A{
    public var name:String = "A";
    public abstract function g():Void;
}

var a = A{
    name: "Name"
    override function g() {

    }
};
------------------------------------------------------

- Refactor->Rename the 'g' function in the 'A' class
The exception pops up.
Comment 3 Alexandr Scherbatiy 2010-02-05 02:42:35 UTC
Created attachment 93898 [details]
IDE log file
Comment 4 J Bachorik 2010-02-05 06:15:45 UTC
fixed in http://hg.netbeans.org/javafx/rev/8499eae85b3a
Comment 5 Alexandr Scherbatiy 2010-02-08 03:21:07 UTC
verified in NetBeans-JavaFX-Soma: #146