]> source.dussan.org Git - aspectj.git/commit
Some preliminary work on this bug bug356694
authorAndy Clement <andrew.clement@gmail.com>
Thu, 16 Aug 2012 20:18:30 +0000 (13:18 -0700)
committerAndy Clement <andrew.clement@gmail.com>
Thu, 16 Aug 2012 20:18:30 +0000 (13:18 -0700)
commitcb835c82ea6abfcaa5e5e3e0056af43b9ba4000f
tree35d067a94cb2c62b361cfd7f4bc0a596cef974d9
parent3875260e02d5ac312c35ff034d7b75407b52820c
Some preliminary work on this bug

This includes a change in shadows in Parser class:

protected void consumeDeclareAnnotation(char kind) {
concatNodeLists();
ASTNode tokens = popPseudoTokens(";");

int annotationCount = this.expressionLengthPtr+1;
Annotation[] annotations = new Annotation[annotationCount];
int count = 0;
int length;
     while (this.expressionLengthPtr>0 && (length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
     System.arraycopy(
     this.expressionStack,
     (this.expressionPtr -= length) + 1,
     annotations = new Annotation[length],
     count++,
     length);
     }

// int length;
// Annotation[] annotations = new Annotation[1]; // there should only ever be one for us...
//     if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
//     System.arraycopy(
//     this.expressionStack,
//     (this.expressionPtr -= length) + 1,
//     annotations = new Annotation[length],
//     0,
//     length);
//     }
     MethodDeclaration declareDecl = declarationFactory.createDeclareAnnotationDeclaration(this.compilationUnit.compilationResult,tokens,annotations,this,kind);
     pushOnAstStack(declareDecl);
}

It touches so much code though and requires a change to serialized form.
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/DeclareAnnotationDeclaration.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/parser/DeclarationFactory.java
org.aspectj.matcher/src/org/aspectj/weaver/patterns/DeclareAnnotation.java
org.eclipse.jdt.core/jdtcore-for-aspectj.jar
tests/src/org/aspectj/systemtest/ajc171/Ajc171Tests.java