author | lana |
Tue, 25 Apr 2017 07:38:50 +0000 | |
changeset 44909 | b53c770dc04f |
parent 26901 | 2c11dc81a5c8 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
26901
2c11dc81a5c8
8055783: Group 9e: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 6379327 |
4 |
* @summary Erroneous catch block not detected with anonymous class declaration |
|
5 |
* @author Peter Jones, Wei Tao |
|
26901
2c11dc81a5c8
8055783: Group 9e: golden files for tests in tools/javac dir
sogoel
parents:
5520
diff
changeset
|
6 |
* @compile/fail/ref=T6379327.out -XDrawDiagnostics T6379327.java |
10 | 7 |
*/ |
8 |
||
9 |
import java.security.*; |
|
10 |
public class T6379327 { |
|
11 |
public static void main(String[] args) { |
|
12 |
final String name = args[0]; |
|
13 |
try { |
|
14 |
new PrivilegedExceptionAction() { |
|
15 |
public Object run() throws ClassNotFoundException { |
|
16 |
return Class.forName(name); |
|
17 |
} |
|
18 |
}; |
|
19 |
} catch (ClassNotFoundException e) { |
|
20 |
e.printStackTrace(); |
|
21 |
} |
|
22 |
} |
|
23 |
} |