Bug 180191 - Code completion throws NullPointerException at com.sun.tools.mjavac.code.Symbol$MethodSymbol.params
Code completion throws NullPointerException at com.sun.tools.mjavac.code.Symb...
Status: VERIFIED FIXED
Product: javafx
Classification: Unclassified
Component: Editor
6.x
All All
: P2 (vote)
: TBD
Assigned To: Petr Nejedly
issues@javafx
EXCEPTIONS_REPORT
:
: 175034 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-03 03:18 UTC by Alexandr Scherbatiy
Modified: 2010-03-11 08:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (2.45 KB, text/plain)
2010-02-03 03:18 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2010-02-03 03:18:15 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: NetBeans-JavaFX-Soma: #141

Steps to reproduce:

- Create 'A' JavaFX class:
---------------------------------------------------------------------------------
public class A {
    public function f(): String { ""    }
}
---------------------------------------------------------------------------------

- Create 'B' JavaFX class:
---------------------------------------------------------------------------------
public class B {

    public var a:A;

    override function toString():String {
        "a: {a.}"
    }

}
---------------------------------------------------------------------------------

- Position cursor after '{a.' in function:
    override function toString():String {
        "a: {a.}"
    }


- Press <Ctrl+Space>

The NPE pops up




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.mjavac.code.Symbol$MethodSymbol.params(Symbol.java:1201)
   at com.sun.tools.mjavac.code.Symbol$MethodSymbol.getParameters(Symbol.java:1233)
   at com.sun.tools.mjavac.code.Symbol$MethodSymbol.getParameters(Symbol.java:985)
   at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionItem$MethodItem.<init>(JavaFXCompletionItem.java:733)
   at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionItem$MethodItem.<init>(JavaFXCompletionItem.java:692)
   at org.netbeans.modules.javafx.editor.completion.JavaFXCompletionItem.createExecutableItem(JavaFXCompletionItem.java:132)
Comment 1 Alexandr Scherbatiy 2010-02-03 03:18:20 UTC
Created attachment 93791 [details]
stacktrace
Comment 2 Petr Nejedly 2010-02-03 05:59:39 UTC
Interesting: It happens only when the class A is really in a separate A.fx file.
If I place the class declaration into B.fx, it won't happen.
Comment 3 Petr Nejedly 2010-02-03 08:10:50 UTC
http://hg.netbeans.org/javafx/rev/a8c9030c213d
Comment 4 Alexandr Scherbatiy 2010-02-05 04:05:59 UTC
verified in NetBeans-JavaFX-Soma: #143
Comment 5 Petr Nejedly 2010-03-11 08:18:48 UTC
*** Bug 175034 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo