Community
Participate
Working Groups
BETA_JAVA7 While reviewing the code changes done for bug 340022, I noticed that, the following program doesn't compile with 1.7 mode anymore. On 1.5 it compiles and runs fine. Javac5 and 7 are ok. public class X { public static void main(String [] args) { doSomething(false); } public static void doSomething (boolean bool) { try { if (bool) throw new GrandSonOfFoo(); else throw new GrandDaughterOfFoo(); } catch(Foo e) { try { throw e; } catch (SonOfFoo e1) { e1.printStackTrace(); } catch (DaughterOfFoo e1) { System.out.println("caught a daughter of foo"); } catch (Foo f) {} } } } class Foo extends Exception {} class SonOfFoo extends Foo {} class GrandSonOfFoo extends SonOfFoo {} class DaughterOfFoo extends Foo {} class GrandDaughterOfFoo extends DaughterOfFoo {}
Patch posted at https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c5 fixes this issue and has a junit also.
(In reply to comment #1) > Patch posted at https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c5 > fixes this issue and has a junit also. Resolved by the patch posted at (released into BETA_JAVA7 branch) https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c8
Verified.