Community
Participate
Working Groups
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"; }
marked as target 1.2.1
Fixed. Changed Jims home grown parser to allow for '+' and multi-line strings. Here is a sick example that now works: declare warning: call(* *(..)): "abc" + "def" + // 'def' was here "ghijklmnopqrstuv" /* silly place for a comment */ + /* oops */ "wxyz"; Waiting for build before closing bug.
Fix available now: BUILD COMPLETE - build.337 Date of build: 08/11/2004 17:19:19 Time to build: 91 minutes 45 seconds Last changed: 08/11/2004 14:18:49 Last log entry: Tests and fix for Bugzilla Bug 54421 Compile time declarations (warning and error) do not accept string concatenation (with +) Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar
Fix released as part of AspectJ 1.2.1