diff options
Diffstat (limited to 'org.aspectj.matcher/src')
3 files changed, 8 insertions, 20 deletions
diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java index 98480f661..6bfd8a897 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java @@ -343,25 +343,15 @@ public class CrosscuttingMembers { Set<Object> theseTypeMungers = new HashSet<>(); Set<Object> otherTypeMungers = new HashSet<>(); if (!careAboutShadowMungers) { - for (Object o : typeMungers) { - if (o instanceof ConcreteTypeMunger) { - ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) o; - if (!typeMunger.existsToSupportShadowMunging()) { - theseTypeMungers.add(typeMunger); - } - } else { - theseTypeMungers.add(o); + for (ConcreteTypeMunger typeMunger : typeMungers) { + if (!typeMunger.existsToSupportShadowMunging()) { + theseTypeMungers.add(typeMunger); } } - for (Object o : other.typeMungers) { - if (o instanceof ConcreteTypeMunger) { - ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) o; - if (!typeMunger.existsToSupportShadowMunging()) { - otherTypeMungers.add(typeMunger); - } - } else { - otherTypeMungers.add(o); + for (ConcreteTypeMunger typeMunger : other.typeMungers) { + if (!typeMunger.existsToSupportShadowMunging()) { + otherTypeMungers.add(typeMunger); } } } else { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/AnnotationPointcut.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/AnnotationPointcut.java index 5f7cd1553..6742e9091 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/AnnotationPointcut.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/AnnotationPointcut.java @@ -140,8 +140,7 @@ public class AnnotationPointcut extends NameBindingPointcut { if (kind == Shadow.FieldGet || kind == Shadow.FieldSet) { // FIXME asc should include supers with getInterTypeMungersIncludingSupers ? List<ConcreteTypeMunger> mungers = rMember.getDeclaringType().resolve(shadow.getIWorld()).getInterTypeMungers(); - for (Object munger : mungers) { - ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) munger; + for (ConcreteTypeMunger typeMunger : mungers) { if (typeMunger.getMunger() instanceof NewFieldTypeMunger) { ResolvedMember fakerm = typeMunger.getSignature(); if (fakerm.equals(member)) { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/StandardPointcutParser.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/StandardPointcutParser.java index 9565230dd..5c4c5423a 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/StandardPointcutParser.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/tools/StandardPointcutParser.java @@ -148,8 +148,7 @@ public class StandardPointcutParser { */ private StandardPointcutParser(Set<PointcutPrimitive> supportedPointcutKinds, World world) { supportedPrimitives = supportedPointcutKinds; - for (Object supportedPointcutKind : supportedPointcutKinds) { - PointcutPrimitive element = (PointcutPrimitive) supportedPointcutKind; + for (PointcutPrimitive element : supportedPointcutKinds) { if ((element == PointcutPrimitive.IF) || (element == PointcutPrimitive.CFLOW) || (element == PointcutPrimitive.CFLOW_BELOW)) { throw new UnsupportedOperationException("Cannot handle if, cflow, and cflowbelow primitives"); |