diff options
author | Andy Clement <aclement@pivotal.io> | 2016-10-28 09:04:08 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-10-28 09:04:08 -0700 |
commit | 64c97807a20105644f604fe9b5263acdb63bd41d (patch) | |
tree | 503afc541169960fd4ec561e48d2f98023c37b56 /org.aspectj.matcher | |
parent | 87856659869b9dbf72e1b329986fb2d727cfad18 (diff) | |
download | aspectj-64c97807a20105644f604fe9b5263acdb63bd41d.tar.gz aspectj-64c97807a20105644f604fe9b5263acdb63bd41d.zip |
Fixing generics warnings
Diffstat (limited to 'org.aspectj.matcher')
3 files changed, 10 insertions, 33 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index 31b978028..8af6cc528 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -1293,7 +1293,7 @@ public abstract class World implements Dump.INode { if (!memoryProfiling) { return; } - Reference r = null; + Reference<? extends ResolvedType> r = null; while ((r=rq.poll()) != null) { collectedTypes++; } diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java b/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java index 6110e6ceb..2aa83c957 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegate.java @@ -23,6 +23,7 @@ import java.util.Collections; import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; import org.aspectj.weaver.AnnotationAJ; import org.aspectj.weaver.AnnotationTargetKind; +import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.ISourceContext; import org.aspectj.weaver.ReferenceType; import org.aspectj.weaver.ReferenceTypeDelegate; @@ -34,6 +35,7 @@ import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.WeakClassLoaderReference; import org.aspectj.weaver.WeaverStateInfo; import org.aspectj.weaver.World; +import org.aspectj.weaver.patterns.Declare; import org.aspectj.weaver.patterns.PerClause; /** @@ -62,7 +64,7 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega public ReflectionBasedReferenceTypeDelegate() { } - public void initialize(ReferenceType aType, Class aClass, ClassLoader aClassLoader, World aWorld) { + public void initialize(ReferenceType aType, Class<?> aClass, ClassLoader aClassLoader, World aWorld) { this.myClass = aClass; this.resolvedType = aType; this.world = aWorld; @@ -302,22 +304,12 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega return null; } - /* - * (non-Javadoc) - * - * @see org.aspectj.weaver.ReferenceTypeDelegate#getDeclares() - */ - public Collection getDeclares() { - // no declares - return Collections.EMPTY_SET; + public Collection<Declare> getDeclares() { + return Collections.emptySet(); } - /* - * @see org.aspectj.weaver.ReferenceTypeDelegate#getTypeMungers() - */ - public Collection getTypeMungers() { - // no type mungers - return Collections.EMPTY_SET; + public Collection<ConcreteTypeMunger> getTypeMungers() { + return Collections.emptySet(); } /* @@ -363,29 +355,14 @@ public class ReflectionBasedReferenceTypeDelegate implements ReferenceTypeDelega return null; } - /* - * (non-Javadoc) - * - * @see org.aspectj.weaver.ReferenceTypeDelegate#getResolvedTypeX() - */ public ReferenceType getResolvedTypeX() { return this.resolvedType; } - /* - * (non-Javadoc) - * - * @see org.aspectj.weaver.ReferenceTypeDelegate#doesNotExposeShadowMungers() - */ public boolean doesNotExposeShadowMungers() { return false; } - /* - * (non-Javadoc) - * - * @see org.aspectj.weaver.ReferenceTypeDelegate#getDeclaredGenericSignature() - */ public String getDeclaredGenericSignature() { // no generic sig in 1.4 return null; diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/tools/AbstractTrace.java b/org.aspectj.matcher/src/org/aspectj/weaver/tools/AbstractTrace.java index c736de886..52217f880 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/tools/AbstractTrace.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/tools/AbstractTrace.java @@ -166,11 +166,11 @@ public abstract class AbstractTrace implements Trace { } } - protected String formatArray (Object obj) { + protected String formatArray(Object obj) { return obj.getClass().getComponentType().getName() + "[" + Array.getLength(obj) + "]"; } - protected String formatCollection (Collection c) { + protected String formatCollection(Collection<?> c) { return c.getClass().getName() + "(" + c.size() + ")"; } |