diff options
Diffstat (limited to 'weaver5/java5-testsrc/org')
-rw-r--r-- | weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java index b8363d040..6127b2dd8 100644 --- a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java +++ b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java @@ -276,6 +276,13 @@ public class Java15PointcutExpressionTest extends TestCase { assertFalse("should not match",sm2.alwaysMatches()); } + public void testJavaLangMatching() throws Exception { + PointcutExpression ex = parser.parsePointcutExpression("@within(java.lang.Deprecated)"); + Method foo = GoldenOldie.class.getMethod("foo"); + ShadowMatch sm1 = ex.matchesMethodExecution(foo); + assertTrue("should match",sm1.alwaysMatches()); + } + protected void setUp() throws Exception { super.setUp(); parser = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader()); @@ -323,6 +330,10 @@ public class Java15PointcutExpressionTest extends TestCase { public void setFriends(List<C> friends) {} } + @Deprecated + static class GoldenOldie { + public void foo() {} + } } |