diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-12 11:22:29 +0300 |
---|---|---|
committer | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-12 11:22:29 +0300 |
commit | 1c487b2e0f54eeb4c2630940e7d57c279ba5a032 (patch) | |
tree | 0c0d84e75783441de07f4193e003429e64b11550 /weaver/src | |
parent | caa2c39be10775a8772a27eea8b9a673dd0bab8d (diff) | |
download | aspectj-1c487b2e0f54eeb4c2630940e7d57c279ba5a032.tar.gz aspectj-1c487b2e0f54eeb4c2630940e7d57c279ba5a032.zip |
Remove redundant casts after generics update
Diffstat (limited to 'weaver/src')
5 files changed, 5 insertions, 5 deletions
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<JarEntry> 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); } |