Community
Participate
Working Groups
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"
As Satyam is away, I'll follow up.
Created attachment 195335 [details] Patch under test
Released in BETA_JAVA7 branch.
Verified.