author | mcimadamore |
Wed, 26 Oct 2016 15:41:25 +0100 | |
changeset 41856 | 13a056e8f16e |
parent 25308 | 190cac01c316 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 4717164 |
4 |
* @summary missing catch not reachable error when nested try-finally returns in finally |
|
5 |
* @author Neal Gafter (gafter) |
|
6 |
* |
|
25308
190cac01c316
8044236: create .out files for DefiniteAssignment tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
7 |
* @compile/fail/ref=T4717164.out -XDrawDiagnostics T4717164.java |
10 | 8 |
*/ |
9 |
||
10 |
class T4717164 { |
|
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 |
} |