Project: AspectJ
Bug 54421 Compile time declarations (warning and error) do not accept string concatenation (with +)
Reported: 2004-03-11 03:00:18 | Status: resolved fixed

The following code does not compile because the message uses string concatenation (the + operator). public class WarningSample { public void method() {} public void anotherMethod() { this.method(); } } aspect WarningAspect { pointcut illegalCall(): call(* WarningSample.method()) && within(WarningSample); // the same thing happens with declare error declare warning: illegalCall() : "Hey, don't " + "do that, that is not nice. You should do something else"; }

Files changed in fix:
tests/bugs/decwStrings.java tests/bugs/decwStringsErroneous.java tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java weaver/src/org/aspectj/weaver/patterns/PatternParser.java