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 201109120600) VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147 OS: Linux User Comments: jocke: editing java source file Stacktrace: java.lang.NullPointerException at org.netbeans.modules.editor.java.JavaCompletionItem$MethodItem$5.run(JavaCompletionItem.java:1699) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314) at org.netbeans.modules.editor.java.JavaCompletionItem$MethodItem.substituteText(JavaCompletionItem.java:1695) at org.netbeans.modules.editor.java.JavaCompletionItem.processKeyEvent(JavaCompletionItem.java:291) at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:637) at org.netbeans.modules.editor.completion.CompletionImpl.keyTyped(CompletionImpl.java:392)
Created attachment 110711 [details] stacktrace
Created attachment 110712 [details] stacktrace
The following steps can reproduce this in dev version 201109100600 1) Create a java class file that looks like so: import javax.swing.JComponent; public class Test { void test() { JComponent comp; comp } } 2) Place the cursor at the end of the line with just the "comp" 3) Press '.' Key and wait for Code-Completion and JavaDoc windows to pop-up or invoke them with Ctrl-Space 4) Enter setFont so the line looks like "comp.setFont" 5) Enter '(' Key which causes the NullPointerException to be thrown
Yep, worked for me. Got a NPE for Product Version = NetBeans IDE Dev (Build 201109120600) (#c50ade4b58c7) Operating System = Linux version 2.6.38-11-generic-pae running on i386 Java; VM; Vendor = 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_26-b03 Java Home = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=181041
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/34b979483344
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/34b979483344 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #202071: NullPointerException at org.netbeans.modules.editor.java.JavaCompletionItem$MethodItem$5.run - fixed.