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.

decwStringsErroneous.java 698B

1234567891011121314151617181920212223242526272829
  1. class WarningSample {
  2. public void method() {}
  3. public void anotherMethod() {
  4. this.method();
  5. }
  6. }
  7. aspect WarningAspect {
  8. pointcut illegalCall(): call(* WarningSample.method())
  9. && within(WarningSample);
  10. // the same thing happens with declare error
  11. declare warning: illegalCall() : "Hey, don't " +
  12. "do that, that is not nice. You should do something else";
  13. public void e1() {}
  14. declare warning: execution(* e1(..)): "hello " + /* comment */ "world"
  15. public void e2() {}
  16. declare warning: execution(* e2(..)): "hello " /* comment + "world";
  17. public void e3() {}
  18. declare warning: execution(* e3(..)): "hello " + // commenthere
  19. }