You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DeprecationWarning.java 586B

123456789101112131415161718
  1. import org.aspectj.testing.Tester;
  2. import org.aspectj.testing.Tester;
  3. import java.rmi.RMISecurityException; // deprecated class
  4. /** @testcase PR#602 PUREJAVA no deprecation warnings (regardless of -deprecation flag) */
  5. public class DeprecationWarning {
  6. public static void main(String[] args) {
  7. boolean result = false;
  8. try {
  9. if (!result) throw new RMISecurityException("ok"); // CW 11 deprecated class
  10. } catch (RMISecurityException e) {
  11. result = true;
  12. }
  13. Tester.check(result, "no RMISecurityException");
  14. }
  15. }