1 /* 2 * @test /nodynamiccopyright/ 3 * @bug 4717164 4 * @summary missing catch not reachable error when nested try-finally returns in finally 5 * @author Neal Gafter (gafter) 6 * 7 * @compile/fail/ref=T4717164.out -XDrawDiagnostics T4717164.java 8 */ 9 10 class T4717164 { main(String[] args)11 public static void main(String[] args) { 12 try { 13 try { 14 throw new ClassNotFoundException(); 15 } catch (ClassNotFoundException e) { 16 throw e; 17 } finally { 18 return; // discards ClassNotFoundException 19 } 20 } catch (ClassNotFoundException e1) { // error: unreachable 21 } 22 } 23 } 24