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.

NoNew_PR398.java 438B

1234567891011121314151617181920212223
  1. import org.aspectj.testing.Tester;
  2. /**
  3. * PR#398
  4. */
  5. class NoNew {
  6. public static void main(String[] args) {
  7. try {
  8. new NoNew().thrower();
  9. } catch (Exception e) {
  10. }
  11. }
  12. void thrower() throws Exception {
  13. throw /*new*/ Exception("exception"); // missing new
  14. }
  15. }
  16. aspect AspectTest of eachJVM() {
  17. pointcut pc3(): executions(void thrower());
  18. before(): pc3() {
  19. }
  20. }