Summary: | [misc] Errors in log from fetching Javadoc when working disconnected | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> | ||||
Component: | Core | Assignee: | Martin Mathew <manju656> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | anchakrk, daniel_megert, david_audel, jarthana, john.arthorne, manju656, Olivier_Thomann | ||||
Version: | 3.5 | Flags: | daniel_megert:
review+
|
||||
Target Milestone: | 4.3 M6 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Bug Depends on: | 247845, 400062 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Dani Megert
2013-02-06 03:24:43 EST
Manju will prepare a patch. Created attachment 227455 [details]
Fix.
Previously ignored exceptions in JavaElement is now thrown using =>
throw new JavaModelException(e, IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC);
Clients will have to handle these exceptions.
Jay, the patch is good. This fix breaks couple of existing tests, one of them added as part of bug 398272. Both the failures are about JME being thrown for packages that don't have a javadoc file. In other words, package fragment is not handling the exception. Perhaps we should leave out the FileNotFoundException or mark the JME in case of FNFE in a way PackageFragment could recognize and handle it? (In reply to comment #4) > Perhaps we should leave out the FileNotFoundException or mark the > JME in case of FNFE in a way PackageFragment could recognize and handle it? Sorry, I didn't look at the patch close enough. The JME indeed wraps the original exception and that should allow clients to handle accordingly to the the cause. I will fix the failing code to handle FileNotFoundException. I have released the patch and the other changes required. The current HEAD is here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=843baf8e7455ebd3d6835c29e35eba1ff6fd62f0 (In reply to comment #5) > (In reply to comment #4) > > Perhaps we should leave out the FileNotFoundException or mark the > > JME in case of FNFE in a way PackageFragment could recognize and handle it? > > Sorry, I didn't look at the patch close enough. The JME indeed wraps the > original exception and that should allow clients to handle accordingly to > the the cause. > > I will fix the failing code to handle FileNotFoundException. The code you added in PackageFragment is wrong and destroys the purpose of the fix. With that change we again do not get the exception on the client side and this is wrong. If that lets a test fail, then you need to adjust the test, not the code. So, it looks like we are revisiting the fix for bug 398272 and moving the fix to the client. I thought I should preserve the fix made for aforementioned fix but this bug was actually trying to roll back it in a way. I have reverted the changes to the PackageFragment and introduced new changes to the tests now. (In reply to comment #8) > So, it looks like we are revisiting the fix for bug 398272 and moving the > fix to the client. I thought I should preserve the fix made for > aforementioned fix but this bug was actually trying to roll back it in a way. > > I have reverted the changes to the PackageFragment and introduced new > changes to the tests now. The Javadoc says it all. There are two cases: 1. there *is* no Javadoc (e.g. no URL specified) ==> 'null' 2. then there is the case when an exception happens, and this must be reported to the client as specified (In reply to comment #8) > I have reverted the changes to the PackageFragment and introduced new > changes to the tests now. Thanks Jay. All our old and new tests pass now. Marking as Resolved. Verified for M6 build eclipse-SDK-I20130310-2000 |