Bug 365582

Summary: FUP of bug 361938: Other error code pattern
Product: [Eclipse Project] JDT Reporter: Satyam Kandula <satyam.kandula>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: srikanth_sankaran, stephan.herrmann
Version: 3.8   
Target Milestone: 3.8 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed fix + regression test none

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.