]> source.dussan.org Git - aspectj.git/commitdiff
Polish
authorAndy Clement <aclement@pivotal.io>
Wed, 22 Apr 2020 18:02:57 +0000 (11:02 -0700)
committerAndy Clement <aclement@pivotal.io>
Wed, 22 Apr 2020 18:02:57 +0000 (11:02 -0700)
weaver/src/test/java/org/aspectj/weaver/Java5ReflectionBasedReferenceTypeDelegateTest.java
weaver/src/test/java/org/aspectj/weaver/JoinPointSignatureIteratorTest.java

index cc9a895d08438a888448cabdb8f5c638de3d03dc..b1f5df571e1c29c7ae299cbe3148263e2d7c5d26 100644 (file)
@@ -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)];
index 30d653b898f5a7913fc45ae7dda659a9eeca835c..ad384fa49e65cb009445ff8c8a4aebfbeecb33f3 100644 (file)
@@ -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);
        }