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 61285

Summary: Frequent NPE from apisupport when editing any class
Product: apisupport Reporter: Roman Strobl <rstrobl>
Component: ProjectAssignee: Martin Krauskopf <mkrauskopf>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: NPE
Project

Description Roman Strobl 2005-07-22 11:47:47 UTC
[NetBeans 200507211800; WinXP; JDK 1.5.0_04]

I am writing a small plug-in and I am getting attached NPE all the time when
editing sources. I am using apisupport.project [1.8 200507211800]. The exception
occurs for instance if I click into imports of the ZipProject.java class -
project attached, too.

java.lang.NullPointerException
	at
org.netbeans.modules.apisupport.project.queries.GlobalJavadocForBinaryImpl.findJavadoc(GlobalJavadocForBinaryImpl.java:51)
	at
org.netbeans.api.java.queries.JavadocForBinaryQuery.findJavadoc(JavadocForBinaryQuery.java:60)
	at
org.netbeans.modules.javacore.parser.ClassFileInfoUtil.getJavadocFile(ClassFileInfoUtil.java:707)
...
Comment 1 Roman Strobl 2005-07-22 11:48:37 UTC
Created attachment 23238 [details]
NPE
Comment 2 Martin Krauskopf 2005-07-22 11:54:28 UTC
Strange. I've tested this by simple test which goes through all modules in the
platform and it works. I'll take a look at it.
Comment 3 Roman Strobl 2005-07-22 12:06:18 UTC
Created attachment 23239 [details]
Project
Comment 4 Roman Strobl 2005-07-22 12:10:52 UTC
FYI, I didn't get any such exception before, it started today once I downloaded
apisupport from UC.
Comment 5 Martin Krauskopf 2005-07-22 12:30:41 UTC
Fixing NPE.

Checking in queries/GlobalJavadocForBinaryImpl.java; 1.1 --> 1.2

Romane could you try to reproduce the bug with the patch and with passing the
following switch to your NB instance, just for curiosity. You should see in a
console line(s) like:

'Cannot found FileObject for " + binaryRootF + "(" + binaryRoot + ")"'

with binaryRoot(F) substituted. Thanks.

Here is the switch
-J-Dorg.netbeans.modules.apisupport.project=0
Comment 6 Roman Strobl 2005-07-25 21:22:30 UTC
It works now ok on both computers where I've tried it - no exceptions are
thrown. However I do not get any new messages in the console. Verified.
Comment 7 Martin Krauskopf 2005-07-26 19:25:27 UTC
*** Issue 61428 has been marked as a duplicate of this issue. ***