Bug 54421

Summary: Compile time declarations (warning and error) do not accept string concatenation (with +)
Product: [Tools] AspectJ Reporter: Antti Karanta <Antti.Karanta>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 1.1.1   
Target Milestone: 1.2.1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Antti Karanta CLA 2004-03-11 03:00:18 EST
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";

}
Comment 1 Adrian Colyer CLA 2004-08-09 15:29:14 EDT
marked as target 1.2.1
Comment 2 Andrew Clement CLA 2004-08-11 09:20:04 EDT
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.
Comment 3 Andrew Clement CLA 2004-08-12 03:10:42 EDT
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
Comment 4 Adrian Colyer CLA 2004-10-21 04:32:18 EDT
Fix released as part of AspectJ 1.2.1