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 192505 - javadoc not found in jme projects
Summary: javadoc not found in jme projects
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-26 10:13 UTC by marcotts
Modified: 2011-02-18 10:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of IDE (30.98 KB, image/png)
2010-11-26 10:15 UTC, marcotts
Details
screenshot of java platform manager (49.45 KB, image/png)
2010-11-26 10:18 UTC, marcotts
Details
Exception catched (2.20 KB, text/plain)
2011-01-18 14:32 UTC, Adam Sotona
Details
Javadoc for the test case (4.22 MB, application/octet-stream/force-download)
2011-01-18 14:35 UTC, Adam Sotona
Details
Test case. (56.39 KB, application/zip)
2011-02-03 09:50 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcotts 2010-11-26 10:13:15 UTC
[ BUILD # : 201011152355 ]
[ JDK VERSION : 1.6.19 ]

when editing a java class belonging to a jme project, using the code completion
reports "javadoc not found" for j2me API.
Comment 1 marcotts 2010-11-26 10:15:04 UTC
Created attachment 103350 [details]
screenshot of IDE
Comment 2 marcotts 2010-11-26 10:18:03 UTC
Created attachment 103351 [details]
screenshot of java platform manager

screenshot of java platform manager showing that javadoc looks configured correctly.
Comment 3 marcotts 2010-12-25 09:44:01 UTC
the same defect is still present in build 201012150001
Comment 4 Adam Sotona 2011-01-18 14:32:37 UTC
Created attachment 105095 [details]
Exception catched

This is an exception thrown during the case.
Comment 5 Adam Sotona 2011-01-18 14:35:22 UTC
Created attachment 105096 [details]
Javadoc for the test case

two Javadoc packages that can be used as a test case
Comment 6 Adam Sotona 2011-01-18 14:39:58 UTC
When you specify Javadoc roots from attached zip in order cdc-1.1 and then midp-2.0 - lookup for javax.microedition.midlet.MIDlet Javadoc fails with attached exception.

When the midp-2.0 root is defined fist - it works.

Increasing priority as it breaks important feature.

Reassigning to java.source as org.netbeans.modules.java.source.JavadocHelper seems to be trying to open a Html file from wrong Javadoc root.
Comment 7 Jan Lahoda 2011-02-03 09:49:31 UTC
The root cause is the org.netbeans.modules.java.source.JavadocHelper.knownGoodRoots cache: whenever any javadoc root is known to contain javadoc for any class, the roots that follow it in the JavadocQuery's result are *never* tried, even if the previous root does not contain the javadoc for the currently queried class.

To reproduce without J2ME:
1. download the attached project, unpack, open
2. open "test.Test", place caret at Lib1 and invoke code completion (and its javadoc popup).
3. test the javadoc for Lib2: does not work
4. go to project properties, edit the lib library, swap the javadoc roots
5. force full reparse of the current file (close&reopen, edit outside method, etc.), so that the other caches are cleared
6. look for Lib2 javadoc: works; Lib1 does not.
Comment 8 Jan Lahoda 2011-02-03 09:50:19 UTC
Created attachment 105612 [details]
Test case.
Comment 9 Jesse Glick 2011-02-03 15:43:14 UTC
Can assign to me if you like; looks like it should be straightforward to fix.
Comment 10 Jesse Glick 2011-02-17 17:44:52 UTC
core-main #acfa71136988
Comment 11 Quality Engineering 2011-02-18 10:31:58 UTC
Integrated into 'main-golden', will be available in build *201102180501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/acfa71136988
User: Jesse Glick <jglick@netbeans.org>
Log: #192505: javadoc not found in jme projects
Activate knownGoodRoots cache only for remote Javadoc, and only when there is just one root URL specified.