Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 403036

Summary: Wrong message is shown when there is no content for Javadoc
Product: [Eclipse Project] JDT Reporter: Noopur Gupta <noopur_gupta>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jarthana, manju656
Version: 4.3   
Target Milestone: 4.3 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fix for M6 none

Description Noopur Gupta CLA 2013-03-12 08:05:28 EDT
1.Create a class:
  public class C1 {
	String s;
  }

2. Hover on 'String' and click on the link for 'java' package.

The message shown in "Note: The attached Javadoc could not be retrieved as the specified Javadoc location is either wrong or currently not accessible."

The javadoc location is specified correctly and is accessible but for 'java' there is no javadoc available and hence no content can be retrieved.

The message indicates a problem with the url even though it is correct.

Cases for a wrong/Inaccessible url and a url where no content is available is not handled differently.
Comment 1 Dani Megert CLA 2013-03-12 11:33:04 EDT
The problem is that after fixing bug 400060 IJavaElement.getAttachedJavadoc(IProgressMonitor) throws a FileNotFoundException for two different cases:

a) the base URL (location of attached Javadoc) is not valid/accessible
b) the base URL is good but there is no Javadoc at that location for the given
   element

For M6 we should just revert (ignore) the FileNotFoundException part. For M7, we need to investigate the cost of checking the base URL and throw the exception there.
Comment 2 Dani Megert CLA 2013-03-12 11:36:34 EDT
Created attachment 228272 [details]
Fix for M6

NOTE: I did not run the JDT Core tests. They might have to be adjusted (again).
Comment 3 Jay Arthanareeswaran CLA 2013-03-12 13:13:34 EDT
Running all JDT/Core tests. Will release when the tests finish.
Comment 4 Jay Arthanareeswaran CLA 2013-03-12 13:33:49 EDT
Released in master for 4.3 M6 (418e34f57c9f7842d3534af171e657c264f02dd7)
Comment 5 Dani Megert CLA 2013-03-13 05:29:01 EDT
(In reply to comment #4)
> Released in master for 4.3 M6 (418e34f57c9f7842d3534af171e657c264f02dd7)

Verified in I20130312-2000.

Filed bug 403154 for checking the base URL.