1
0
espelhamento de https://github.com/eclipse-aspectj/aspectj.git sincronizado 2024-08-26 17:58:43 +02:00
org.aspectj/tests/new/FalseThrowsCE.java
2002-12-16 18:51:06 +00:00

16 linhas
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");
}
}