diff options
author | Andy Clement <aclement@pivotal.io> | 2016-11-18 09:00:28 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-11-18 09:00:28 -0800 |
commit | b6f2b6337fbaf95b78c20862cd90f0e027509531 (patch) | |
tree | da38bdf8ab392b0e6f49da7a676a75f885fe9b85 /bcel-builder | |
parent | e8be95bbfd291f93319d1a1e9920e44cd7eb7569 (diff) | |
download | aspectj-b6f2b6337fbaf95b78c20862cd90f0e027509531.tar.gz aspectj-b6f2b6337fbaf95b78c20862cd90f0e027509531.zip |
Fix 500035: handling target only binding in @AJ pointcut
Diffstat (limited to 'bcel-builder')
3 files changed, 5 insertions, 5 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java index 21673dec0..3938beb35 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java @@ -1082,7 +1082,7 @@ public class MethodGen extends FieldGenOrMethodGen { /** * Return a list of AnnotationGen objects representing parameter annotations */ - public List getAnnotationsOnParameter(int i) { + public List<AnnotationGen> getAnnotationsOnParameter(int i) { ensureExistingParameterAnnotationsUnpacked(); if (!hasParameterAnnotations || i > parameterTypes.length) { return null; diff --git a/bcel-builder/src/org/aspectj/apache/bcel/util/NonCachingClassLoaderRepository.java b/bcel-builder/src/org/aspectj/apache/bcel/util/NonCachingClassLoaderRepository.java index 7a8c06224..a53b9dc35 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/util/NonCachingClassLoaderRepository.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/util/NonCachingClassLoaderRepository.java @@ -85,7 +85,7 @@ public class NonCachingClassLoaderRepository implements Repository { private static java.lang.ClassLoader bootClassLoader = null; private final ClassLoaderReference loaderRef; - private final Map<String, JavaClass> loadedClasses = new SoftHashMap(); // CLASSNAME X JAVACLASS + private final Map<String, JavaClass> loadedClasses = new SoftHashMap(); public static class SoftHashMap extends AbstractMap { private Map<Object, SpecialValue> map; @@ -96,10 +96,10 @@ public class NonCachingClassLoaderRepository implements Repository { } public SoftHashMap() { - this(new HashMap()); + this(new HashMap<Object,SpecialValue>()); } - public SoftHashMap(Map map, boolean b) { + public SoftHashMap(Map<Object,SpecialValue> map, boolean b) { this(map); } diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java index 7dd83ddb7..093a4b6e4 100644 --- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java +++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/ParameterAnnotationsTest.java @@ -262,7 +262,7 @@ public class ParameterAnnotationsTest extends BcelTestCase { mg = new MethodGen(m,clg.getClassName(),clg.getConstantPool()); List<Attribute> as = mg.getAttributes(); assertTrue("Should be 2 (RIPA and RVPA) but there are "+mg.getAttributes().size(),mg.getAttributes().size()==2); - List l = mg.getAnnotationsOnParameter(0); + List<AnnotationGen> l = mg.getAnnotationsOnParameter(0); assertTrue("Should be 2 annotations on first parameter but there is only "+l.size()+":"+l.toString(), l.size()==2); assertTrue("Should be 0 but there are "+mg.getAttributes().size(),mg.getAttributes().size()==0); |