diff options
author | aclement <aclement> | 2006-11-20 13:20:41 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-11-20 13:20:41 +0000 |
commit | e8d2556d9448375fcf578695c082f81aa604fddb (patch) | |
tree | 8dc6bcc91cf70cc383d6be8a2876625556f2b273 /loadtime | |
parent | 7143428801aa03299b6ff1651df7012097024576 (diff) | |
download | aspectj-e8d2556d9448375fcf578695c082f81aa604fddb.tar.gz aspectj-e8d2556d9448375fcf578695c082f81aa604fddb.zip |
fix for 165148 - don't resolve things you are 99 percent sure won't be found
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java index 2b3a36381..89dc420fb 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java @@ -24,6 +24,7 @@ import org.aspectj.apache.bcel.generic.annotation.SimpleElementValueGen; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.Message; import org.aspectj.weaver.AnnotationX; +import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ResolvedMember; import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; @@ -107,8 +108,10 @@ public class ConcreteAspectCodeGen { } // name must be undefined so far - ResolvedType current = m_world.resolve(m_concreteAspect.name, true); - if (!current.isMissing()) { + // TODO only convert the name to signature once, probably earlier than this + ResolvedType current = m_world.lookupBySignature(UnresolvedType.forName(m_concreteAspect.name).getSignature()); + + if (current!=null && !current.isMissing()) { reportError("Attempt to concretize but chosen aspect name already defined: " + stringify()); return false; } @@ -375,10 +378,8 @@ public class ConcreteAspectCodeGen { } // handle the perClause - BcelPerClauseAspectAdder perClauseMunger = new BcelPerClauseAspectAdder( - ResolvedType.forName(m_concreteAspect.name).resolve(m_world), - m_perClause.getKind() - ); + ReferenceType rt = new ReferenceType(ResolvedType.forName(m_concreteAspect.name).getSignature(),m_world); + BcelPerClauseAspectAdder perClauseMunger = new BcelPerClauseAspectAdder(rt,m_perClause.getKind()); perClauseMunger.forceMunge(cg, false); //TODO AV - unsafe cast |