From 1c487b2e0f54eeb4c2630940e7d57c279ba5a032 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Tue, 12 Apr 2022 11:22:29 +0300 Subject: Remove redundant casts after generics update --- weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java | 2 +- weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java | 2 +- weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java | 2 +- .../java/org/aspectj/weaver/loadtime/definition/LightXMLParser.java | 2 +- weaver/src/main/java/org/aspectj/weaver/ltw/LTWWorld.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'weaver/src') diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java index 42679304b..6a71640ca 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -2380,7 +2380,7 @@ class BcelClassWeaver implements IClassWeaver { ShadowRange oldRange = (ShadowRange) old; if (oldRange.getStart() == src) { BcelShadow oldShadow = oldRange.getShadow(); - BcelShadow freshEnclosing = oldShadow.getEnclosingShadow() == null ? null : (BcelShadow) shadowMap + BcelShadow freshEnclosing = oldShadow.getEnclosingShadow() == null ? null : shadowMap .get(oldShadow.getEnclosingShadow()); BcelShadow freshShadow = oldShadow.copyInto(recipient, freshEnclosing); ShadowRange freshRange = new ShadowRange(recipient.getBody()); diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java index 7d471a6b6..7a40ed542 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelObjectType.java @@ -822,7 +822,7 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate { } if (isGeneric()) { // update resolved typex to point at generic type not raw type. - ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType(); + ReferenceType genericType = this.resolvedTypeX.getGenericType(); // genericType.setSourceContext(this.resolvedTypeX.getSourceContext()); // Can be null if unpacking whilst building the bcel delegate (in call hierarchy from BcelWorld.addSourceObjectType() // line 453) - see 317139 diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java index ccea81f49..d4f47cbe7 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWeaver.java @@ -389,7 +389,7 @@ public class BcelWeaver { Enumeration entries = inJar.entries(); while (entries.hasMoreElements()) { - JarEntry entry = (JarEntry) entries.nextElement(); + JarEntry entry = entries.nextElement(); InputStream inStream = inJar.getInputStream(entry); byte[] bytes = FileUtil.readAsByteArray(inStream); diff --git a/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/LightXMLParser.java b/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/LightXMLParser.java index c076c3a2f..2e3d5532c 100644 --- a/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/LightXMLParser.java +++ b/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/LightXMLParser.java @@ -432,7 +432,7 @@ public class LightXMLParser { } buf.append(c); } else { - char[] value = (char[]) entities.get(key); + char[] value = entities.get(key); if (value == null) { throw new Exception("Unknown entity: " + key); } diff --git a/weaver/src/main/java/org/aspectj/weaver/ltw/LTWWorld.java b/weaver/src/main/java/org/aspectj/weaver/ltw/LTWWorld.java index 4677a3939..4631178d4 100644 --- a/weaver/src/main/java/org/aspectj/weaver/ltw/LTWWorld.java +++ b/weaver/src/main/java/org/aspectj/weaver/ltw/LTWWorld.java @@ -230,7 +230,7 @@ public class LTWWorld extends BcelWorld implements IReflectionWorld { typeCompletionInProgress = false; } while (typesForCompletion.size() != 0) { - ResolvedType rt = (ResolvedType) typesForCompletion.get(0); + ResolvedType rt = typesForCompletion.get(0); completeHierarchyForType(rt); typesForCompletion.remove(0); } -- cgit v1.2.3