2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-10-01 21:15:40 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 6379327
|
|
|
|
* @summary Erroneous catch block not detected with anonymous class declaration
|
|
|
|
* @author Peter Jones, Wei Tao
|
2014-10-01 21:15:40 +00:00
|
|
|
* @compile/fail/ref=T6379327.out -XDrawDiagnostics T6379327.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
import java.security.*;
|
|
|
|
public class T6379327 {
|
2023-01-17 04:43:40 +00:00
|
|
|
public static void meth(String[] args) {
|
2007-12-01 00:00:00 +00:00
|
|
|
final String name = args[0];
|
|
|
|
try {
|
|
|
|
new PrivilegedExceptionAction() {
|
|
|
|
public Object run() throws ClassNotFoundException {
|
|
|
|
return Class.forName(name);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} catch (ClassNotFoundException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|