author | sogoel |
Fri, 05 Sep 2014 16:43:00 -0700 | |
changeset 26528 | a1a7ad15183e |
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 4718142 |
4 |
* @summary DU analysis not conservative for try-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=T4718142.out -XDrawDiagnostics T4718142.java |
10 | 8 |
*/ |
9 |
||
10 |
class T4718142 { |
|
11 |
static class E extends Exception {} |
|
12 |
static void thr() throws E { |
|
13 |
throw new E(); |
|
14 |
} |
|
15 |
public static void main(String[] args) { |
|
16 |
int count = 0; |
|
17 |
final int i; |
|
18 |
while (true) { |
|
19 |
try { |
|
20 |
i = count++; |
|
21 |
System.out.println("assigned " + i); |
|
22 |
thr(); |
|
23 |
while (true) {} |
|
24 |
} catch (E e) {} |
|
25 |
} |
|
26 |
} |
|
27 |
} |