diff options
author | aclement <aclement> | 2008-04-18 19:43:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-04-18 19:43:54 +0000 |
commit | c1494c616e54a3a8288bd567a87e4287ba4a4b7d (patch) | |
tree | ae426904811dd8f6c28370bbb0917e5cf6b99953 /weaver5/java5-src | |
parent | 2a9efe4b94c05164ef39c4b49a5927a3f255b87c (diff) | |
download | aspectj-c1494c616e54a3a8288bd567a87e4287ba4a4b7d.tar.gz aspectj-c1494c616e54a3a8288bd567a87e4287ba4a4b7d.zip |
227029: multithreaded bug in reflection
Diffstat (limited to 'weaver5/java5-src')
-rw-r--r-- | weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java index 1a66bf066..629a0f441 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java @@ -249,7 +249,7 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends public ResolvedMember[] getDeclaredPointcuts() { if (pointcuts == null) { Pointcut[] pcs = this.myType.getDeclaredPointcuts(); - ResolvedMember[] rPointcuts = new ResolvedMember[pcs.length]; + pointcuts = new ResolvedMember[pcs.length]; InternalUseOnlyPointcutParser parser = null; World world = getWorld(); if (world instanceof ReflectionWorld) { @@ -271,7 +271,7 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends for (int j = 0; j < weaverPTypes.length; j++) { weaverPTypes[j] = this.typeConverter.fromType(ptypes[j].getJavaClass()) ; } - rPointcuts[i] = new DeferredResolvedPointcutDefinition(getResolvedTypeX(), pcs[i].getModifiers(), pcs[i].getName(), weaverPTypes); + pointcuts[i] = new DeferredResolvedPointcutDefinition(getResolvedTypeX(),pcs[i].getModifiers(),pcs[i].getName(),weaverPTypes); } // phase 2, now go back round and resolve in-place all of the pointcuts PointcutParameter[][] parameters = new PointcutParameter[pcs.length][]; @@ -289,15 +289,14 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends parameters[i][j] = parser.createPointcutParameter(pnames[j],ptypes[j].getJavaClass()); } String pcExpr = pcs[i].getPointcutExpression().toString(); org.aspectj.weaver.patterns.Pointcut pc = parser.resolvePointcutExpression(pcExpr,getBaseClass(),parameters[i]); - ((ResolvedPointcutDefinition) rPointcuts[i]).setParameterNames(pnames); - ((ResolvedPointcutDefinition) rPointcuts[i]).setPointcut(pc); + ((ResolvedPointcutDefinition)pointcuts[i]).setParameterNames(pnames); + ((ResolvedPointcutDefinition)pointcuts[i]).setPointcut(pc); } // phase 3, now concretize them all - for (int i = 0; i < rPointcuts.length; i++) { - ResolvedPointcutDefinition rpd = (ResolvedPointcutDefinition) rPointcuts[i]; + for (int i = 0; i < pointcuts.length; i++) { + ResolvedPointcutDefinition rpd = (ResolvedPointcutDefinition) pointcuts[i]; rpd.setPointcut(parser.concretizePointcutExpression(rpd.getPointcut(), getBaseClass(), parameters[i])); } - this.pointcuts = rPointcuts; } return pointcuts; } |