mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-09 14:15:52 +02:00
16 lines
457 B
Java
16 lines
457 B
Java
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");
|
|
}
|
|
}
|