diff options
author | aclement <aclement> | 2006-08-07 13:04:28 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-08-07 13:04:28 +0000 |
commit | c779c96eff482f8b99fe5d7f85505f1792780281 (patch) | |
tree | 05dcb30d67255d81ef51a0e87996cbfff162f5f2 /loadtime | |
parent | 73368931c7c7b346b062321c83a55c86ecd41ffd (diff) | |
download | aspectj-c779c96eff482f8b99fe5d7f85505f1792780281.tar.gz aspectj-c779c96eff482f8b99fe5d7f85505f1792780281.zip |
fix for 152871: parsing bytecode too often
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index 1ea1397ca..75775e5ea 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -36,10 +36,7 @@ import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.World; import org.aspectj.weaver.Lint.Kind; -import org.aspectj.weaver.bcel.BcelObjectType; import org.aspectj.weaver.bcel.BcelWeaver; -import org.aspectj.weaver.bcel.BcelWorld; -import org.aspectj.weaver.bcel.Utility; import org.aspectj.weaver.loadtime.definition.Definition; import org.aspectj.weaver.loadtime.definition.DocumentParser; import org.aspectj.weaver.ltw.LTWWorld; @@ -542,8 +539,9 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { // does returns null or some other info for getResourceAsStream (f.e. WLS 9 CR248491) // Instead I parse the given bytecode. But this also means it will be parsed again in // new WeavingClassFileProvider() from WeavingAdaptor.getWovenBytes()... - BcelObjectType bct = ((BcelWorld)weaver.getWorld()).addSourceObjectType(Utility.makeJavaClass(null, bytes)); - ResolvedType classInfo = bct.getResolvedTypeX();//BAD: weaver.getWorld().resolve(UnresolvedType.forName(className), true); + + ensureDelegateInitialized(className,bytes); + ResolvedType classInfo = delegateForCurrentClass.getResolvedTypeX();//BAD: weaver.getWorld().resolve(UnresolvedType.forName(className), true); //exclude are "AND"ed for (Iterator iterator = m_excludeTypePattern.iterator(); iterator.hasNext();) { @@ -566,7 +564,8 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { return accept; } - //FIXME we don't use include/exclude of others aop.xml + + //FIXME we don't use include/exclude of others aop.xml //this can be nice but very dangerous as well to change that private boolean acceptAspect(String aspectClassName) { // avoid ResolvedType if not needed |