From 04ccf76fdb776388dbdef108d69183f01fe8821c Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 18 Feb 2009 22:21:51 +0000 Subject: [PATCH] 265360: test and fix for annotation style references from string pointcuts --- tests/bugs164/pr265360/Foo.java | 12 +++ tests/bugs164/pr265360/Main.java | 15 ++++ .../systemtest/ajc164/Ajc164Tests.java | 88 +++++++++++++++---- .../org/aspectj/systemtest/ajc164/ajc164.xml | 6 ++ 4 files changed, 104 insertions(+), 17 deletions(-) create mode 100644 tests/bugs164/pr265360/Foo.java create mode 100644 tests/bugs164/pr265360/Main.java diff --git a/tests/bugs164/pr265360/Foo.java b/tests/bugs164/pr265360/Foo.java new file mode 100644 index 000000000..826c0f059 --- /dev/null +++ b/tests/bugs164/pr265360/Foo.java @@ -0,0 +1,12 @@ +package example; +import java.util.Date; +import java.util.List; + +public class Foo { + Date foo() { + return null; + } + List goo() { + return null; + } +} diff --git a/tests/bugs164/pr265360/Main.java b/tests/bugs164/pr265360/Main.java new file mode 100644 index 000000000..25e4ac329 --- /dev/null +++ b/tests/bugs164/pr265360/Main.java @@ -0,0 +1,15 @@ +package example; + +import org.aspectj.lang.annotation.*; + +import java.util.Date; + +@Aspect +public class Main { + @Pointcut("execution(Date foo())") + public void pc() {} + + @Before("pc()") + public void log() {} + +} diff --git a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java index edf0da502..a8f7b32c7 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java @@ -11,6 +11,9 @@ package org.aspectj.systemtest.ajc164; import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.Iterator; import java.util.List; @@ -29,6 +32,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testIncorrectDateResolution_pr265360() { + runTest("incorrect resolution of Date"); + } + public void testDualPreClinit_pr233032() { runTest("dual preClinit"); } @@ -40,7 +47,8 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase { ipe = findElementAtLine(top.getRoot(), 13); assertEquals(" + + + + + + -- 2.39.5