Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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. }