| Summary: | [1.7][compiler] Incorrect error range for unreachable catch block error in multi-catch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | Olivier_Thomann, srikanth_sankaran | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
As Satyam is away, I'll follow up. Created attachment 195335 [details]
Patch under test
Released in BETA_JAVA7 branch. Verified. |
BETA_JAVA7 For the following code snippet, the error marker is at an inappropriate location: package multiCatch; public class PreciseRethrow { /** * @param args */ public static void main(String[] args) { try { throw new DaughterOfFoo(); } catch (Foo e) { try { throw e; // used to throw Foo, now throws DaughterOfFoo } catch (Foo f) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RuntimeException | SonOfFoo f) { } } } } Note that the error "Unreachable catch block for SonOfFoo" is marked at RuntimeException, whereas it should either be marked for the entire catch expression or only at "SonOfFoo"