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 50505 - NPE from Javadoc completion
Summary: NPE from Javadoc completion
Status: CLOSED DUPLICATE of bug 50537
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Martin Roskanin
URL:
Keywords:
: 50560 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-15 22:21 UTC by Jan Chalupa
Modified: 2007-11-05 13:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Chalupa 2004-10-15 22:21:02 UTC
[custom build of 20041015 sources; JDK 1.4.2_04]

I typed an innocent code construct:

    List strings = new ArrayList();
    while (Iterator it = strings.

Code completion came up. The following NPE was 
thrown shortly after that:

java.lang.NullPointerException
	at 
org.netbeans.modules.javacore.JMManager.getSource
ElementIfExists(JMManager.java:1251)
	at 
org.netbeans.modules.editor.java.JMIUtils.getSour
ceElementIfExists(JMIUtils.java:688)
	at 
org.netbeans.modules.editor.java.NbJMICompletionJ
avaDoc$JMIParsingThread.findOverridenMethod
(NbJMICompletionJavaDoc.java:367)
	at 
org.netbeans.modules.editor.java.NbJMICompletionJ
avaDoc$JMIParsingThread.setFeature
(NbJMICompletionJavaDoc.java:500)
	at 
org.netbeans.modules.editor.java.NbJMICompletionJ
avaDoc$JMIParsingThread.run
(NbJMICompletionJavaDoc.java:599)
	at org.openide.util.Task.run
(Task.java:136)
	at 
org.openide.util.RequestProcessor$Task.run
(RequestProcessor.java:330)
[catch] at 
org.openide.util.RequestProcessor$Processor.run
(RequestProcessor.java:686)
Comment 1 Martin Matula 2004-10-18 11:51:58 UTC
Seems that editor passes null to JMManager.getSourceElementIfExists().
This is probably a duplicate (or a consequence) of 50537.
Comment 2 Martin Roskanin 2004-10-18 12:35:02 UTC
Already fixed. Thanks for the report

*** This issue has been marked as a duplicate of 50537 ***
Comment 3 Jan Chalupa 2004-10-18 12:59:44 UTC
Verified duplicate.
Comment 4 Martin Matula 2004-10-18 15:28:08 UTC
*** Issue 50560 has been marked as a duplicate of this issue. ***