diff options
author | aclement <aclement> | 2011-01-08 01:17:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-01-08 01:17:40 +0000 |
commit | 75e44f31e461eaca930a2f662eadbbfa3e7c93a2 (patch) | |
tree | c988bb17bf9df0329ccefd17df161d37b69e0be4 /org.aspectj.matcher | |
parent | 56056248ac9416df92d62a547d676d80419454b8 (diff) | |
download | aspectj-75e44f31e461eaca930a2f662eadbbfa3e7c93a2.tar.gz aspectj-75e44f31e461eaca930a2f662eadbbfa3e7c93a2.zip |
333469
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java index 0b514d6ca..eb4b4444e 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/CrosscuttingMembers.java @@ -209,9 +209,25 @@ public class CrosscuttingMembers { // Looking it up ensures we get the annotations - the accessedMembers are just retrieved from the attribute and // don't have that information ResolvedMember resolvedMember = world.resolve(member); + + // pr333469 + // If the member is for an ITD (e.g. serialVersionUID) then during resolution we may resolve it on + // a supertype because it doesn't yet exist on the target. + // For example: MyList extends ArrayList<String> and the ITD is on MyList - after resolution it may be: + // ArrayList<String>.serialVersionUID, we need to avoid that happening + if (resolvedMember == null) { // can happen for ITDs - are there many privileged access ITDs?? resolvedMember = member; + if (resolvedMember.hasBackingGenericMember()) { + resolvedMember = resolvedMember.getBackingGenericMember(); + } + } else { + UnresolvedType unresolvedDeclaringType = member.getDeclaringType().getRawType(); + UnresolvedType resolvedDeclaringType = resolvedMember.getDeclaringType().getRawType(); + if (!unresolvedDeclaringType.equals(resolvedDeclaringType)) { + resolvedMember = member; + } } PrivilegedAccessMunger privilegedAccessMunger = new PrivilegedAccessMunger(resolvedMember, version >= WeaverVersionInfo.WEAVER_VERSION_AJ169); |