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.

12345678910111213141516171819202122232425
  1. import org.aspectj.testing.Tester;
  2. public class PR590 {
  3. public static void main (String args []) {
  4. staticMethod ();
  5. new PR590().instanceMethod("bar");
  6. }
  7. public static String staticMethod () {
  8. return null;
  9. }
  10. public String instanceMethod(String a) {
  11. return "foo";
  12. }
  13. }
  14. aspect A {
  15. after () returning (String s):
  16. execution(static String PR590.staticMethod()) && if(s == null) { } //ERR
  17. after () throwing (Error e):
  18. execution(static String PR590.staticMethod()) && if(e != null) { } //ERR
  19. }