aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/bridgeMethods/AspectX.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/java5/bridgeMethods/AspectX.aj')
-rw-r--r--tests/java5/bridgeMethods/AspectX.aj17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/java5/bridgeMethods/AspectX.aj b/tests/java5/bridgeMethods/AspectX.aj
index 12ecf12fc..8222e5e27 100644
--- a/tests/java5/bridgeMethods/AspectX.aj
+++ b/tests/java5/bridgeMethods/AspectX.aj
@@ -4,26 +4,15 @@ public aspect AspectX {
static Set matchedJps = new HashSet();
- before(): call(* Number.compareTo(..)) {
- matchedJps.add(new String("call() matched on "+thisJoinPoint.toString()));
- }
-
before(): execution(* Number.compareTo(..)) {
matchedJps.add(new String("execution() matched on "+thisJoinPoint.toString()));
}
-
+
public static void main(String []argv) {
Number n1 = new Number(5);
Number n2 = new Number(7);
- n1.compareTo(n2);
- n1.compareTo("abc"); // A Java5 compiler would *not* allow this, a call to a bridge method: error should be:
- /**
- AspectX.java:19: compareTo(Number) in Number cannot be applied to (java.lang.String)
- n1.compareTo("abc");
- ^
- 1 error
- */
-
+ n1.compareTo(n2);
+
Iterator i = matchedJps.iterator();
while (i.hasNext()) {
String s = (String)i.next();