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 - Frequent NPE from apisupport when editing any class
Summary: Frequent NPE from apisupport when editing any class
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
: 61428 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-22 11:47 UTC by Roman Strobl
Modified: 2005-09-05 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (4.60 KB, text/plain)
2005-07-22 11:48 UTC, Roman Strobl
Details
Project (6.27 KB, application/x-compressed)
2005-07-22 12:06 UTC, Roman Strobl
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***