diff options
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/Type.java | 1 | ||||
-rw-r--r-- | lib/bcel/bcel-src.zip | bin | 340811 -> 340815 bytes | |||
-rw-r--r-- | lib/bcel/bcel-verifier.jar | bin | 166985 -> 166985 bytes | |||
-rw-r--r-- | lib/bcel/bcel.jar | bin | 319932 -> 319954 bytes | |||
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java | 9 | ||||
-rw-r--r-- | tests/bugs190/paramannos/Code.java | 13 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc190/ajc190.xml | 8 |
9 files changed, 35 insertions, 1 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/Type.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/Type.java index 36d6d7d72..e1dc47348 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/Type.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/Type.java @@ -91,6 +91,7 @@ public abstract class Type { public static final ObjectType STRING = new ObjectType("java.lang.String"); public static final ObjectType OBJECT_ARRAY = new ObjectType("java.lang.Object[]"); public static final ObjectType STRING_ARRAY = new ObjectType("java.lang.String[]"); + public static final ObjectType CLASS_ARRAY = new ObjectType("java.lang.Class[]"); public static final ObjectType STRINGBUFFER = new ObjectType("java.lang.StringBuffer"); public static final ObjectType STRINGBUILDER = new ObjectType("java.lang.StringBuilder"); public static final ObjectType THROWABLE = new ObjectType("java.lang.Throwable"); diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip Binary files differindex 5a2fc5dc7..1cbe73979 100644 --- a/lib/bcel/bcel-src.zip +++ b/lib/bcel/bcel-src.zip diff --git a/lib/bcel/bcel-verifier.jar b/lib/bcel/bcel-verifier.jar Binary files differindex 1f9edfddc..b55ed6429 100644 --- a/lib/bcel/bcel-verifier.jar +++ b/lib/bcel/bcel-verifier.jar diff --git a/lib/bcel/bcel.jar b/lib/bcel/bcel.jar Binary files differindex 57f1b9c0a..2306787c5 100644 --- a/lib/bcel/bcel.jar +++ b/lib/bcel/bcel.jar diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java index a4bf804af..365b5b7a7 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java @@ -72,6 +72,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { this.isExactDeclaringTypePattern = (declaringType instanceof ExactTypePattern); } + @Override public SignaturePattern resolveBindings(IScope scope, Bindings bindings) { if (returnType != null) { returnType = returnType.resolveBindings(scope, bindings, false, false); @@ -290,6 +291,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { * return a copy of this signature pattern in which every type variable reference is replaced by the corresponding entry in the * map. */ + @Override public SignaturePattern parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w) { SignaturePattern ret = new SignaturePattern(kind, modifiers, returnType.parameterizeWith(typeVariableMap, w), declaringType .parameterizeWith(typeVariableMap, w), name, parameterTypes.parameterizeWith(typeVariableMap, w), throwsPattern @@ -298,6 +300,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { return ret; } + @Override public boolean matches(Member joinPointSignature, World world, boolean allowBridgeMethods) { // fail (or succeed!) fast tests... if (joinPointSignature == null) { @@ -628,7 +631,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC, parameterAnnotationTypes).alwaysTrue()) { // It could still be a match based on the generic sig parameter types of a parameterized type - if (!parameterTypes.matches(world.resolve(aConstructor.getGenericParameterTypes()), TypePattern.STATIC).alwaysTrue()) { + if (!parameterTypes.matches(world.resolve(aConstructor.getGenericParameterTypes()), TypePattern.STATIC, parameterAnnotationTypes).alwaysTrue()) { return FuzzyBoolean.MAYBE; // It could STILL be a match based on the erasure of the parameter types?? // to be determined via test cases... @@ -968,6 +971,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { return annotationPattern; } + @Override public boolean isStarAnnotation() { return annotationPattern == AnnotationTypePattern.ANY; } @@ -981,10 +985,12 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { return isExactDeclaringTypePattern; } + @Override public boolean isMatchOnAnyName() { return getName().isAny(); } + @Override public List<ExactTypePattern> getExactDeclaringTypes() { if (declaringType instanceof ExactTypePattern) { List<ExactTypePattern> l = new ArrayList<ExactTypePattern>(); @@ -995,6 +1001,7 @@ public class SignaturePattern extends PatternNode implements ISignaturePattern { } } + @Override public boolean couldEverMatch(ResolvedType type) { return declaringType.matches(type, TypePattern.STATIC).maybeTrue(); } diff --git a/tests/bugs190/paramannos/Code.java b/tests/bugs190/paramannos/Code.java new file mode 100644 index 000000000..1ab184346 --- /dev/null +++ b/tests/bugs190/paramannos/Code.java @@ -0,0 +1,13 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@interface Anno {} + +public class Code { + public Code(@Anno String boo) {} + public Code(Object boo) {} +} + +aspect X { + before(): execution(new(!@Anno (*))) { } +} diff --git a/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java index 613c1247a..3d3659f77 100644 --- a/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java @@ -22,6 +22,10 @@ import junit.framework.Test; */ public class Ajc190Tests extends XMLBasedAjcTestCaseForJava9OrLater { + public void testParamAnnosNegative() { + runTest("param annos negative"); + } + public void testAnnotMethodHasMember_pr156962_1() { // From similar in Ajc153Tests runTest("Test Annot Method Has Member 1"); } diff --git a/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java index 4f795f960..2ebc12e7c 100644 --- a/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java +++ b/tests/src/org/aspectj/systemtest/ajc190/AllTestsAspectJ190.java @@ -20,6 +20,7 @@ public class AllTestsAspectJ190 { // $JUnit-BEGIN$ suite.addTest(Ajc190Tests.suite()); suite.addTest(SanityTests19.suite()); +// suite.addTest(EfficientTJPTests.suite()); suite.addTest(ModuleTests.suite()); suite.addTest(Annotations.suite()); // $JUnit-END$ diff --git a/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml index b69926377..dc311f63f 100644 --- a/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml +++ b/tests/src/org/aspectj/systemtest/ajc190/ajc190.xml @@ -2,6 +2,14 @@ <suite> + + <ajc-test dir="bugs190/paramannos" title="param annos negative"> + <compile files="Code.java" options="-1.9 -showWeaveInfo"> + <message kind="weave" text="Join point 'constructor-execution(void Code.<init>(java.lang.Object))' in Type 'Code' (Code.java:8) advised by before advice from 'X' (Code.java:12)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs190/modules/aaa" title="build a module"> <compile files="module-info.java com/foo1/C1.java" options="-1.9"/> </ajc-test> |