jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 6379327
4* @summary Erroneous catch block not detected with anonymous class declaration
5* @author Peter Jones, Wei Tao
6* @compile/fail/ref=T6379327.out -XDrawDiagnostics T6379327.java
7*/
8
9import java.security.*;
10public class T6379327 {
11public static void meth(String[] args) {
12final String name = args[0];
13try {
14new PrivilegedExceptionAction() {
15public Object run() throws ClassNotFoundException {
16return Class.forName(name);
17}
18};
19} catch (ClassNotFoundException e) {
20e.printStackTrace();
21}
22}
23}
24