blob: 89fb3c21de0ab179450b7d25c3b084afc89e1c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import org.aspectj.testing.Tester;
/**
* @testTarget compilerErrors.false.exceptions Throwable treated as checked, false compiler error
*/
public class FalseThrowsCE {
public static void main(String[] args) {
try {
System.getProperty("").toString(); // potential NPE, SecurityException
} catch (Throwable e) { // (false) CE: Throwable never thrown
String s = "got " + e;
}
Tester.check(true,"ok - compiled without error");
}
}
|