Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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