diff options
author | aclement <aclement> | 2008-08-27 00:38:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-27 00:38:33 +0000 |
commit | 13a2f4c18a0032c246dd744c7a212cc2a3840e84 (patch) | |
tree | bee1c37033448e9485f1c692ae8bc8a1f211eed6 /weaver | |
parent | 6b38c14ff11a3fc1321bfb2b225be8bb3e44598b (diff) | |
download | aspectj-13a2f4c18a0032c246dd744c7a212cc2a3840e84.tar.gz aspectj-13a2f4c18a0032c246dd744c7a212cc2a3840e84.zip |
findbugs/eclipse warnings fixed
Diffstat (limited to 'weaver')
6 files changed, 17 insertions, 17 deletions
diff --git a/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java b/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java index 1a0a52d8a..8b8473b3a 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java +++ b/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java @@ -743,7 +743,7 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno // } declaringType = declaringType.resolve(w); if (declaringType.isRawType()) declaringType = ((ResolvedType)declaringType).getGenericType(); - TypeVariable[] typeVariables = getDeclaringType().getTypeVariables(); +// TypeVariable[] typeVariables = getDeclaringType().getTypeVariables(); // if (isParameterized && (typeVariables.length != typeParameters.length)) { // throw new IllegalStateException("Wrong number of type parameters supplied"); // } @@ -817,12 +817,12 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno // if (!(getDeclaringType() instanceof ResolvedType)) { // int stop = 1; // } - if (aType instanceof UnresolvedType) { +// if (aType!=null) {// instanceof UnresolvedType) { if (w!=null) aType = aType.resolve(w); else { aType= aType.resolve(((ResolvedType)getDeclaringType()).getWorld()); } - } +// } return aType.parameterize(typeVariableMap); } else { return aType.getRawType(); diff --git a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java index db0ca8bec..757fac8eb 100644 --- a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java +++ b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java @@ -1232,19 +1232,19 @@ public class AtAjAttributes { return false;//stop } } else { - if (pointcutExpr==null || (pointcutExpr != null && isNullOrEmpty(pointcutExpr.getValue().stringifyValue()))) { + if (pointcutExpr==null || isNullOrEmpty(pointcutExpr.getValue().stringifyValue())) { // the matches nothing pointcut (125475/125480) - perhaps not as cleanly supported as it could be. } else { - if (pointcutExpr != null) { +// if (pointcutExpr != null) { // use a LazyResolvedPointcutDefinition so that the pointcut is resolved lazily // since for it to be resolved, we will need other pointcuts to be registered as well pc = parsePointcut(pointcutExpr.getValue().stringifyValue(), struct, true); if (pc == null) return false;//parse error pc.setLocation(struct.context, -1, -1);//FIXME AVASM !! bMethod is null here.. - } else { - reportError("Found undefined @Pointcut on a non-abstract method", struct); - return false; - } +// } else { +// reportError("Found undefined @Pointcut on a non-abstract method", struct); +// return false; +// } } } // do not resolve binding now but lazily diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 910293913..ee5d41fad 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -972,7 +972,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { for (int ii = 0;ii<originalParams.length;ii++) { if (!originalParams[ii].getErasureSignature().equals(newParams[ii].getErasureSignature())) needsbridging=true; } - if (toBridgeTo!=null && needsbridging) { + if (needsbridging) { ResolvedMember bridgerMethod = AjcMemberMaker.bridgerToInterMethod(unMangledInterMethod,gen.getType()); ResolvedMember bridgingSetter = AjcMemberMaker.interMethod(toBridgeTo, aspectType, false); diff --git a/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java b/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java index 12107649c..fc4a9d561 100644 --- a/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java +++ b/weaver/src/org/aspectj/weaver/reflect/ReflectionWorld.java @@ -43,11 +43,11 @@ public class ReflectionWorld extends World implements IReflectionWorld { private AnnotationFinder annotationFinder; private ReflectionWorld() { - super(); - this.setMessageHandler(new ExceptionBasedMessageHandler()); - setBehaveInJava5Way(LangUtil.is15VMOrGreater()); - this.classLoaderReference = new WeakClassLoaderReference(ReflectionWorld.class.getClassLoader()); - this.annotationFinder = makeAnnotationFinderIfAny(classLoaderReference.getClassLoader(), this); +// super(); +// this.setMessageHandler(new ExceptionBasedMessageHandler()); +// setBehaveInJava5Way(LangUtil.is15VMOrGreater()); +// this.classLoaderReference = new WeakClassLoaderReference(ReflectionWorld.class.getClassLoader()); +// this.annotationFinder = makeAnnotationFinderIfAny(classLoaderReference.getClassLoader(), this); } public ReflectionWorld(ClassLoader aClassLoader) { diff --git a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java index 231df0c75..dc4c2e3d1 100644 --- a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java @@ -149,7 +149,7 @@ public class TypeXTestCase extends TestCase { assertTrue("Expected parameterization flag to be "+shouldBeParameterized,tx.isParameterizedType()==shouldBeParameterized); if (numberOfTypeParameters==0) { UnresolvedType[] params = tx.getTypeParameters(); - assertTrue("Expected 0 type parameters but found "+params.length,params==null || params.length==0); + assertTrue("Expected 0 type parameters but found "+params.length, params.length==0); } else { assertTrue("Expected #type parameters to be "+numberOfTypeParameters,tx.getTypeParameters().length==numberOfTypeParameters); } diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java index 3408e759a..adf8f415f 100644 --- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java @@ -100,7 +100,7 @@ public class AnnotationPatternTestCase extends TestCase { public void testParseBadPattern() { PatternParser p = new PatternParser("@@Foo"); try { - AnnotationTypePattern bad = p.maybeParseAnnotationPattern(); + p.maybeParseAnnotationPattern(); fail("ParserException expected"); } catch(ParserException pEx) { assertEquals("name pattern",pEx.getMessage()); |