aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2020-04-22 11:02:57 -0700
committerAndy Clement <aclement@pivotal.io>2020-04-22 11:02:57 -0700
commit7e0b21d1326d5180ba64cfe4b0b3c440e5fd55d8 (patch)
tree13ecf1be3bd3cb4c417305108427aec5960fd83f /weaver
parent4803a9abdddce387188640308e9ce1d7b61471a8 (diff)
downloadaspectj-7e0b21d1326d5180ba64cfe4b0b3c440e5fd55d8.tar.gz
aspectj-7e0b21d1326d5180ba64cfe4b0b3c440e5fd55d8.zip
Polish
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java3
-rw-r--r--weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java28
2 files changed, 15 insertions, 16 deletions
diff --git a/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java b/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java
index cc9a895d0..b1f5df571 100644
--- a/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java
+++ b/weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java
@@ -66,7 +66,7 @@ public class Java5ReflectionBasedReferenceTypeDelegateTest extends ReflectionBas
ReferenceType rawType = (ReferenceType) world.resolve(javaUtilMap);
assertTrue("Should be the raw type ?!? " + rawType.getTypekind(), rawType.isRawType());
- ReferenceType genericType = (ReferenceType) rawType.getGenericType();
+ ReferenceType genericType = rawType.getGenericType();
assertTrue("Should be the generic type ?!? " + genericType.getTypekind(), genericType.isGenericType());
ResolvedType rt = rawType.getSuperclass();
@@ -83,7 +83,6 @@ public class Java5ReflectionBasedReferenceTypeDelegateTest extends ReflectionBas
public void testAnnotationFinderClassRetention() throws Exception {
ResolvedType type = world.resolve(AnnoTesting.class.getName());
ResolvedMember[] ms = type.getDeclaredMethods();
- int findMethod = findMethod("a", ms);
ResolvedMember methodWithOnlyClassLevelAnnotation = ms[findMethod("a", ms)];
ResolvedMember methodWithOnlyRuntimeLevelAnnotation = ms[findMethod("b", ms)];
diff --git a/weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java b/weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java
index 30d653b89..ad384fa49 100644
--- a/weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java
+++ b/weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java
@@ -1,12 +1,12 @@
/* *******************************************************************
* Copyright (c) 2009 Contributors.
- * All rights reserved.
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution and is available at
- * http://eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
* Andy Clement
* ******************************************************************/
package org.aspectj.weaver;
@@ -52,7 +52,7 @@ public class JoinPointSignatureIteratorTest extends TestCase {
if (expectedResults.containsKey(rm.toString())) {
System.out.println("\nChecking: " + rm);
int i = 0;
- List/* String */sigs = (List) expectedResults.get(rm.toString());
+ List<String> sigs = expectedResults.get(rm.toString());
Iterator jpsi = rm.getJoinPointSignatures(w);
while (jpsi.hasNext()) {
ResolvedMember sig = (ResolvedMember) jpsi.next();
@@ -75,32 +75,32 @@ public class JoinPointSignatureIteratorTest extends TestCase {
}
}
- public static Map expectedResults = new HashMap();
+ public static Map<String, List<String>> expectedResults = new HashMap<>();
static {
- List sigs = new ArrayList();
+ List<String> sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get1(java.io.Serializable)");
sigs.add("java.lang.Object MessageService.get1(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
expectedResults.put("java.lang.Object $Proxy1.get1(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get2(java.io.Serializable)");
sigs.add("java.lang.Object MessageService.get2(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
expectedResults.put("java.lang.Object $Proxy1.get2(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object $Proxy1.get1(java.lang.Long)");
expectedResults.put("java.lang.Object $Proxy1.get1(java.lang.Long)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object GenericService.get1(java.io.Serializable)");
expectedResults.put("java.lang.Object GenericService.get1(java.io.Serializable)", sigs);
- sigs = new ArrayList();
+ sigs = new ArrayList<String>();
sigs.add("java.lang.Object GenericService.get2(java.io.Serializable)");
expectedResults.put("java.lang.Object GenericService.get2(java.io.Serializable)", sigs);
}