From 237604e31504b5da74448fc9e3c389bd998640aa Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 23 Sep 2009 16:03:49 +0000 Subject: [PATCH] 290227: fix and test --- .../AbstractTimingAnnotatedAspect.java | 39 ++++++++++++++++++ .../pr290227/TimingAnnotatedAspect.java | 13 ++++++ tests/bugs166/pr290227/javacCode.jar | Bin 0 -> 2765 bytes .../systemtest/ajc166/Ajc166Tests.java | 4 ++ .../org/aspectj/systemtest/ajc166/ajc166.xml | 4 ++ 5 files changed, 60 insertions(+) create mode 100644 tests/bugs166/pr290227/AbstractTimingAnnotatedAspect.java create mode 100644 tests/bugs166/pr290227/TimingAnnotatedAspect.java create mode 100644 tests/bugs166/pr290227/javacCode.jar diff --git a/tests/bugs166/pr290227/AbstractTimingAnnotatedAspect.java b/tests/bugs166/pr290227/AbstractTimingAnnotatedAspect.java new file mode 100644 index 000000000..512f48ba1 --- /dev/null +++ b/tests/bugs166/pr290227/AbstractTimingAnnotatedAspect.java @@ -0,0 +1,39 @@ +package aspects; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; + +@ Aspect +public abstract class AbstractTimingAnnotatedAspect { + + @Pointcut("within(*..AbstractJPivotPortlet+) " + + "&& (execution(* do*(..))" + + "|| execution(* processAction*(..))" + + "|| execution(* serveResource*(..)) )") + protected final void portletEntryMethods() {} + + @Pointcut("execution(* eu.ibacz.pbns..*.*(..)) || execution(* com.tonbeller..*.*(..))") + protected final void tracedMethods() {} + + @Pointcut("within(aspects.*) || within(aspects..*)") + protected final void thisAspectClasses() {} + + @Pointcut("cflow(execution(* TimingAnnotatedAspect.processInvocationFinished(..)))") + protected final void thisAspectExecution() {} + + @Pointcut + protected abstract void scope(); + + @Before("scope() && portletEntryMethods() && !thisAspectClasses() && !thisAspectExecution()") + public void logStackTrace(final JoinPoint thisJoinPoint) throws Throwable { + System.out.println("logStackTrace: Logging the current stack trace prior to " + + "the execution of " + + thisJoinPoint.getSignature().toShortString() + + new Exception("Current stack trace print out.")); + } /* logStackTrace */ + +} diff --git a/tests/bugs166/pr290227/TimingAnnotatedAspect.java b/tests/bugs166/pr290227/TimingAnnotatedAspect.java new file mode 100644 index 000000000..4dc2b3bf4 --- /dev/null +++ b/tests/bugs166/pr290227/TimingAnnotatedAspect.java @@ -0,0 +1,13 @@ +package aspects; + +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; + +@ Aspect +public class TimingAnnotatedAspect extends AbstractTimingAnnotatedAspect { + + @Pointcut("") + protected void scope() {} + + +} diff --git a/tests/bugs166/pr290227/javacCode.jar b/tests/bugs166/pr290227/javacCode.jar new file mode 100644 index 0000000000000000000000000000000000000000..86b96bf4cc271dd155af1a6835d6775f3b15e2b3 GIT binary patch literal 2765 zcma)82{@E(7aqn~hoL4hlp@PFcFIl*#xjPnP9YhLts+dw9@(--d?KqD0 z4rhM=N!ee)dU?f}Uo{;@a0YRJ>FpJ%lF)kxk{ARt5QZD0i6S6Y7Bc5y`QFJq34y9Y z!Y5rPU6pVBP2`{uJ^5Dx{Q|FNNA;c@Ss3?gS9!OjLDHzMyR*GLO=<$DX(`9ei^WdR z9ff^Wi^D?OSHdluGMh19{pjD1Spnb2QH@~}=S{OZ=2in?Ml0lI2;(3xLcsr~XtoU4 zszxY+Tu|s4aamh>Y_k**9vNxaCfZ|W{473r@>bT6XnP95pR2VY_u#1-@w^s4;X64K z-J0c8&|hDUaSkNa*OtAz41R^;($DTGJrhyB{)`Xom#qJLObH_>()h zjYWswVw7;Z9yeSwlA-8WUBk?A{q#rd-4By;H6Qi(0jku$7>qQo@;)}oG<8ZGn)K+hJz&bHApe!i3hc!S>qy1v zlKCV_<*SL<=`g#~axu9ULQQ|nkKnDaoj?~vxBDD1pSY&wte*oMLMgUANhc~~@%m;F zIlS4wr<~>TKY8jtd9gx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OKoiGB7|n!zoJ#0Kj&$u%{5}QNK34;Q!6Qk4BG^ZeOzg*{b<_SV z)4FNTx*7Ly|Dm_`1Ja6P|GCnNW6unBC&$mT`|p5%2MF5zFaQABU9r36C(c59`xnY! BeZ~L) literal 0 HcmV?d00001 diff --git a/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java b/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java index d90274798..714e81fac 100644 --- a/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java @@ -18,6 +18,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc166Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testNpeForJavacBuilt_290227() { + runTest("npe for javac built"); + } + public void testBinaryDecpSuperRewrite_290087() { runTest("binary decp super rewrite"); } diff --git a/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml b/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml index a1885afcc..991cfdb68 100644 --- a/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml +++ b/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml @@ -2,6 +2,10 @@ + + + + -- 2.39.5