Bug 54421 - Compile time declarations (warning and error) do not accept string concatenation (with +)
Summary: Compile time declarations (warning and error) do not accept string concatenat...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 1.2.1   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-11 03:00 EST by Antti Karanta CLA
Modified: 2004-10-21 04:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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