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.
I'm using daily build from the 11th of December (downloaded from netbeans.org) on Windows XP. In some cases, code completion throws an error. I don't understand which cases those are, but here's the code that I had where the error happens CONSISTENTLY for me: PaletteController controler = jbossddPaletteFactory.getPalette(); Lookup selection = controler.getSelectedItem(); And then I tried code completion on the controler method (i.e., I put the cursor in the second statement above, after the PERIOD). Then the code completion flashes on the screen very quickly, then crashes, and then I see these errors: java.lang.NullPointerException at org.netbeans.modules.editor.java.NbJMICompletionJavaDoc$JMIParsingThread.getTypeName(NbJMICompletionJavaDoc.java:596) at org.netbeans.modules.editor.java.NbJMICompletionJavaDoc$JMIParsingThread.getFieldHeader(NbJMICompletionJavaDoc.java:720) at org.netbeans.modules.editor.java.NbJMICompletionJavaDoc$JMIParsingThread.run(NbJMICompletionJavaDoc.java:820) at org.netbeans.modules.editor.java.JavaCompletionProvider$DocQuery$DocItem$MyJavaDoc.setItem(JavaCompletionProvider.java:274) at org.netbeans.modules.editor.java.JavaCompletionProvider$DocQuery$DocItem$MyJavaDoc.access$100(JavaCompletionProvider.java:267) at org.netbeans.modules.editor.java.JavaCompletionProvider$DocQuery$DocItem.<init>(JavaCompletionProvider.java:232) at org.netbeans.modules.editor.java.JavaCompletionProvider$DocQuery.query(JavaCompletionProvider.java:199) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Fixed in [maintrunk]. Checking in src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java,v <-- NbJMICompletionJavaDoc.java new revision: 1.30; previous revision: 1.29 done
diff: http://java.netbeans.org/source/browse/java/editor/src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java?r1=1.29&r2=1.30 Mila, could you please review the fix for 5.0? Roman, could you please test it?
I approve the fix.
Yes, I will test it in next daily build.
Got a similar exception. to reproduce: ------------- 1) create new J2SE project 2) in Main.java:main() method type: Main.class.| 3) invoke CC IDE throws:
Created attachment 27738 [details] NullPointerException
Second NPE from TypeParameterImpl.initChildren fixed in trunk. Checking in TypeParameterImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java,v <-- TypeParameterImpl.java new revision: 1.29; previous revision: 1.28 done
Helper method JavaModelUtil.createTypeReferenceFromType() added to allow code-completion to display information from Java classes which have netiher JavaDoc nor source files. Checking in src/org/netbeans/modules/javacore/internalapi/JavaModelUtil.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/JavaModelUtil.java,v <-- JavaModelUtil.java new revision: 1.17; previous revision: 1.16 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ SemiPersistentElement.java,v <-- SemiPersistentElement.java new revision: 1.77; previous revision: 1.76 done
Helper method JavaModelUtil.createTypeReferenceFromType() is called to display information from Java classes which have netiher JavaDoc nor source files. Checking in src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java,v <-- NbJMICompletionJavaDoc.java new revision: 1.31; previous revision: 1.30 done
Diffs: http://java.netbeans.org/source/browse/java/editor/src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java?r1=1.29&r2=1.31 http://java.netbeans.org/source/browse/java/javacore/src/org/netbeans/modules/javacore/internalapi/JavaModelUtil.java?r1=1.16&r2=1.17 http://java.netbeans.org/source/browse/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java?r1=1.76&r2=1.77 http://java.netbeans.org/source/browse/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java?r1=1.28&r2=1.29 Mila, Tomas, could you please review the diffs before integration into 5.0? Roman, could you please test it?
*** Issue 70308 has been marked as a duplicate of this issue. ***
I approve the editor's part of fix.
Diff for NbJMICompletionJavaDoc.java looks good.
*** Issue 70348 has been marked as a duplicate of this issue. ***
Diffs looks fine.
I tested it on trunk build 200512131900 and didn't get the exception. I agree with fixing in the release50 branch.
This issue was also marked as a Q-build stopper due to many reports.
Although this issue is Q-build stopper we have no special Q-build branch. The fix must go just to trunk and release50 branch.
Integrated into [release50]. Checking in src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/NbJMICompletionJavaDoc.java,v <-- NbJMICompletionJavaDoc.java new revision: 1.29.2.1; previous revision: 1.29 done Checking in src/org/netbeans/modules/javacore/internalapi/JavaModelUtil.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/JavaModelUtil.java,v <-- JavaModelUtil.java new revision: 1.16.4.1; previous revision: 1.16 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java,v <-- SemiPersistentElement.java new revision: 1.76.2.1; previous revision: 1.76 done Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/TypeParameterImpl.java,v <-- TypeParameterImpl.java new revision: 1.28.4.1; previous revision: 1.28 done
*** Issue 70432 has been marked as a duplicate of this issue. ***
*** Issue 70474 has been marked as a duplicate of this issue. ***
I'm not able to reproduce the NPE's anymore, marking as verified. [5.0 200512222030 && dev 200512221900]