Bug 365582 - FUP of bug 361938: Other error code pattern
Summary: FUP of bug 361938: Other error code pattern
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 08:30 EST by Satyam Kandula CLA
Modified: 2012-01-24 10:06 EST (History)
2 users (show)

See Also:


Attachments
Proposed fix + regression test (3.79 KB, patch)
2012-01-19 14:48 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satyam Kandula CLA 2011-12-05 08:30:51 EST
They are two minor errors in the code though they don't seem to impact any functionality. 
1. In org.eclipse.jdt.internal.core.dom.NaiveASTFlattener.visit(TryStatement), the call to resources should have been in the if-block of AST.JLS4. 
2. Some calls to org.eclipse.jdt.core.dom.ASTNode.unsupportedIn2() have similar error code patterns found to the one causing problems in bug 361938. 
Eg:  org.eclipse.jdt.core.dom.ASTNode.unsupportedIn2()
Comment 1 Olivier Thomann CLA 2012-01-19 14:48:19 EST
Created attachment 209772 [details]
Proposed fix + regression test
Comment 2 Srikanth Sankaran CLA 2012-01-19 16:44:43 EST
Sorry, I didn't pay closer attention to earlier.
The fix for bug 361938 is not appropriate and
works only because there are two bugs now that
somewhat cancel out each other.
Comment 3 Srikanth Sankaran CLA 2012-01-19 19:22:05 EST
Patch & tests released for 3.8 M5 via
http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=eb40a119cd5ecacf8e90c38261ec37c99b5a07b7.
Comment 4 Srikanth Sankaran CLA 2012-01-19 19:24:18 EST
I'll leave the maintenance branches as they are. The API
doesn't do what the javadoc claims in the case of a badly
broken client that looks up resources in pre java mode,
but that is unlikely scenario and it is late for 3.7.2
Comment 5 Srikanth Sankaran CLA 2012-01-24 10:06:17 EST
Verified for 3.8 M5 by code inspection.