]> source.dussan.org Git - aspectj.git/commitdiff
findbugs: cleared warnings
authoraclement <aclement>
Tue, 26 Aug 2008 21:00:03 +0000 (21:00 +0000)
committeraclement <aclement>
Tue, 26 Aug 2008 21:00:03 +0000 (21:00 +0000)
weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java
weaver5/java5-testsrc/org/aspectj/weaver/Jdk14TraceFactoryTest.java
weaver5/java5-testsrc/org/aspectj/weaver/Jdk14TraceTest.java
weaver5/java5-testsrc/org/aspectj/weaver/TestJava5ReflectionBasedReferenceTypeDelegate.java
weaver5/java5-testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java
weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java

index 47f70c36662bf1d0003114e4dabaca0bce7fda54..44e359d0bcff9053ef67bd509b7b11078f5baafe 100644 (file)
@@ -308,7 +308,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
                                org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember);
                                anns = bcelCons.getParameterAnnotations();
                        } else if (onMember instanceof Field) {
-                               anns = null;
+//                             anns = null;
                        }
                        // the answer is cached and we don't want to hold on to memory
                        bcelRepository.clear();
@@ -336,7 +336,7 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder {
                } else if (onMember instanceof Constructor) {
                        anns = ((Constructor)ao).getParameterAnnotations();
                } else if (onMember instanceof Field) {
-                       anns = null;
+//                     anns = null;
                }
                if (anns == null) return NO_PARAMETER_ANNOTATIONS;
                ResolvedType[][] result = new ResolvedType[anns.length][];
index 39bdef23d6336ca77ee5ae2e2d86c3f740068354..cec4d6a3d3d6e300183ab2d59a02d83dad0fca6d 100644 (file)
@@ -18,7 +18,7 @@ import org.aspectj.weaver.tools.Trace;
 public class Jdk14TraceFactoryTest extends TestCase {
 
        public void testJdk14TraceFactory() {
-               Jdk14TraceFactory factory = new Jdk14TraceFactory();
+               new Jdk14TraceFactory();
        }
 
        public void testGetTrace() {
index 5accd227b5f3fd00c5779082b056273a4bd114c0..0c694cc9d9d9decc14a7dd4242a201c736166212 100644 (file)
@@ -22,7 +22,7 @@ public class Jdk14TraceTest extends AbstractTraceTest {
        }
 
        public void testJdk14Trace() {
-               Jdk14Trace trace = new Jdk14Trace(getClass());
+               new Jdk14Trace(getClass());
        }
 
        public void testSetTraceEnabled() {
index 94f13adf4206cb1edfa0570a3ee67699111457d7..5861c02209bea4a690f0efa8e13931ad2993f842 100644 (file)
@@ -36,7 +36,7 @@ public class TestJava5ReflectionBasedReferenceTypeDelegate extends ReflectionBas
                world.resolve(collectionType).getRawType().resolve(world);
                ResolvedMember[] methods = world.resolve(collectionType).getDeclaredMethods();
                int i = findMethod("toArray", 1, methods);
-               assertTrue("Couldn't find 'toArray' in the set of methods? "+methods,i != -1);
+               assertTrue("Couldn't find 'toArray' in the set of methods? ",i != -1);
                String expectedSignature = "java.lang.Object[] java.util.Collection.toArray(java.lang.Object[])";
                assertTrue("Expected signature of '"+expectedSignature+"' but it was '"+methods[i],methods[i].toString().equals(expectedSignature));
        }
index 28cf82f5a34c840a567402e221ab5bfd2b4abf57..f849352d7ea50860bb7077f4ae05f014c7489c11 100644 (file)
@@ -61,7 +61,7 @@ public class BcelGenericSignatureToTypeXTestCase extends TestCase {
                                cSig.formalTypeParameters,
                                world);
                assertEquals("Ljava/lang/Object;",resolved.getSignature());
-               UnresolvedType resolvedInt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
+                       BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
                                cSig.superInterfaceSignatures[0],
                                cSig.formalTypeParameters,
                                world);
index fa1e1d17deda69e3816a25a371a01b907b4f5597..47b57fe9a527fe205dcb1ab009e126b07232463e 100644 (file)
@@ -153,14 +153,14 @@ public class Java15PointcutExpressionTest extends TestCase {
                Method a = test.A.class.getMethod("a",new Class[] {String.class});             // public void a(String s) {}
                Method b = test.A.class.getMethod("b",new Class[] {String.class});             // public void b(@A1 String s) {}
                Method c = test.A.class.getMethod("c",new Class[] {String.class});             // public void c(@A1 @A2 String s) {}
-               Method d = test.A.class.getMethod("d",new Class[] {String.class,String.class});// public void d(@A1 String s,@A2 String t) {}
+//             Method d = test.A.class.getMethod("d",new Class[] {String.class,String.class});// public void d(@A1 String s,@A2 String t) {}
 
                Method e = test.A.class.getMethod("e",new Class[] {A1AnnotatedType.class});    // public void e(A1AnnotatedType s) {}
                Method f = test.A.class.getMethod("f",new Class[] {A2AnnotatedType.class});    // public void f(A2AnnotatedType s) {}
                Method g = test.A.class.getMethod("g",new Class[] {A1AnnotatedType.class});    // public void g(@A2 A1AnnotatedType s) {}
                Method h = test.A.class.getMethod("h",new Class[] {A1AnnotatedType.class});    // public void h(@A1 A1AnnotatedType s) {}
-               Method i = test.A.class.getMethod("i",new Class[] {A1AnnotatedType.class,String.class});    // public void i(A1AnnotatedType s,@A2 String t) {}
-               Method j = test.A.class.getMethod("j",new Class[] {String.class});             // public void j(@A1 @A2 String s) {}
+//             Method i = test.A.class.getMethod("i",new Class[] {A1AnnotatedType.class,String.class});    // public void i(A1AnnotatedType s,@A2 String t) {}
+//             Method j = test.A.class.getMethod("j",new Class[] {String.class});             // public void j(@A1 @A2 String s) {}
 
                pexpr = p.parsePointcutExpression("execution(public void *(@test.A1 *))");
                assertTrue("Should not match", pexpr.matchesMethodExecution(a).neverMatches());
@@ -223,7 +223,7 @@ public class Java15PointcutExpressionTest extends TestCase {
                           " was '"+expectedNodeStructure+"' but it turned out to be '"+mpnv.getStringRepresentation()+"'");
          }
          
-         String annotationTypePattern = tps[parameterNumber].getAnnotationPattern().toString();
+         tps[parameterNumber].getAnnotationPattern().toString();
          
          // parameter type annotation checking
          Set<String> expected = new HashSet<String>();
@@ -558,7 +558,7 @@ public class Java15PointcutExpressionTest extends TestCase {
        }
        
        public void testAnnotationInExecution() throws Exception {
-               PointcutExpression ex = parser.parsePointcutExpression("execution(@(org.springframework..*) * *(..))");         
+               parser.parsePointcutExpression("execution(@(org.springframework..*) * *(..))");         
        }
        
        public void testVarArgsMatching() throws Exception {
@@ -599,7 +599,7 @@ public class Java15PointcutExpressionTest extends TestCase {
                params[0] = parser.createPointcutParameter("d", Date.class);
                params[1] = parser.createPointcutParameter("s", String.class);
                params[2] = parser.createPointcutParameter("ss", String[].class);
-               PointcutExpression ex = parser.parsePointcutExpression("org.aspectj.weaver.tools.Java15PointcutExpressionTest.UsesArrays.pc(d,s,ss)",UsesArrays.class,params);
+               parser.parsePointcutExpression("org.aspectj.weaver.tools.Java15PointcutExpressionTest.UsesArrays.pc(d,s,ss)",UsesArrays.class,params);
        }
        
        protected void setUp() throws Exception {