From 13a2f4c18a0032c246dd744c7a212cc2a3840e84 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 27 Aug 2008 00:38:33 +0000 Subject: [PATCH] findbugs/eclipse warnings fixed --- .../src/org/aspectj/weaver/ResolvedMemberImpl.java | 6 +++--- .../src/org/aspectj/weaver/bcel/AtAjAttributes.java | 12 ++++++------ .../src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 2 +- .../org/aspectj/weaver/reflect/ReflectionWorld.java | 10 +++++----- weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java | 2 +- .../weaver/patterns/AnnotationPatternTestCase.java | 2 +- 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