From 7569aad932296bce469e719e67a67a8d1bc8bc8b Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 7 Jan 2015 16:22:57 -0800 Subject: 456457: unresolvable member fix. Testcode for 456801,455608 --- tests/bugs185/456357/DummyClass.java | 13 +++++++++++++ tests/bugs185/456357/LogMe.java | 5 +++++ tests/bugs185/456357/SampleAspect.java | 10 ++++++++++ tests/bugs185/456357/SampleUtil.java | 5 +++++ 4 files changed, 33 insertions(+) create mode 100644 tests/bugs185/456357/DummyClass.java create mode 100644 tests/bugs185/456357/LogMe.java create mode 100644 tests/bugs185/456357/SampleAspect.java create mode 100644 tests/bugs185/456357/SampleUtil.java (limited to 'tests/bugs185/456357') diff --git a/tests/bugs185/456357/DummyClass.java b/tests/bugs185/456357/DummyClass.java new file mode 100644 index 000000000..f3d8572ec --- /dev/null +++ b/tests/bugs185/456357/DummyClass.java @@ -0,0 +1,13 @@ +public class DummyClass { + @LogMe + public void doSomething() { + SampleUtil sampleUtil = new SampleUtil(); + // pass null for simplicity ! + sampleUtil.sampleMethod(null); + System.out.println("Do Something"); + } + + public static void main(String[] args) { + new DummyClass().doSomething(); + } +} diff --git a/tests/bugs185/456357/LogMe.java b/tests/bugs185/456357/LogMe.java new file mode 100644 index 000000000..a16ca765a --- /dev/null +++ b/tests/bugs185/456357/LogMe.java @@ -0,0 +1,5 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface LogMe {} diff --git a/tests/bugs185/456357/SampleAspect.java b/tests/bugs185/456357/SampleAspect.java new file mode 100644 index 000000000..15b52fa71 --- /dev/null +++ b/tests/bugs185/456357/SampleAspect.java @@ -0,0 +1,10 @@ +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.*; + +aspect SampleAspect { +//@Aspect public class SampleAspect { + //@Before("@annotation(logMe)") public void beforeAdvice(JoinPoint thisJoinPoint, LogMe logMe) { +before(LogMe logMe): @annotation(logMe) { + System.out.println(thisJoinPoint); + } +} diff --git a/tests/bugs185/456357/SampleUtil.java b/tests/bugs185/456357/SampleUtil.java new file mode 100644 index 000000000..1ed161c42 --- /dev/null +++ b/tests/bugs185/456357/SampleUtil.java @@ -0,0 +1,5 @@ +import java.util.Map; + +public class SampleUtil { + public void sampleMethod(Map[] mapArray) {} +} -- cgit v1.2.3