diff options
author | wisberg <wisberg> | 2002-12-20 04:54:45 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-20 04:54:45 +0000 |
commit | 8312dfbc60b4589559f6943973cec819d28c68d6 (patch) | |
tree | c923c4f05b3049e9f18ab63c4ca50c42d2199b6c /tests/bugs/IncompatibleClassChangeErrorBug.java | |
parent | bc0c559654cb471c8392ded0f25d12b527e1f115 (diff) | |
download | aspectj-8312dfbc60b4589559f6943973cec819d28c68d6.tar.gz aspectj-8312dfbc60b4589559f6943973cec819d28c68d6.zip |
added test cases for old jitterbugs
moved passing tests from ajcTestsFailing to ajcTests
Diffstat (limited to 'tests/bugs/IncompatibleClassChangeErrorBug.java')
-rw-r--r-- | tests/bugs/IncompatibleClassChangeErrorBug.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/bugs/IncompatibleClassChangeErrorBug.java b/tests/bugs/IncompatibleClassChangeErrorBug.java new file mode 100644 index 000000000..3bb968703 --- /dev/null +++ b/tests/bugs/IncompatibleClassChangeErrorBug.java @@ -0,0 +1,38 @@ + +import org.aspectj.testing.Tester; +import org.aspectj.lang.*; +import org.aspectj.lang.reflect.*; + +/** @testcase PR#901 IncompatibleClassChangeError bug */ +public class IncompatibleClassChangeErrorBug { + + public static void main(String[] args) { + Tester.expectEvent("printed"); + method1(); + Tester.checkAllEvents(); + } + public static void method1() { + } +} + +aspect JoinpointTestAspect { + before() : call(static void method1()) { + printArgs(thisJoinPoint); + + // This call is required to reproduce the bug... + printStaticInfo(thisJoinPointStaticPart); + } + + + private void printArgs(JoinPoint joinPoint) { + Object[] args = joinPoint.getArgs(); + // While the original code had a for() loop to print arguments + // bug can be seen without it... + } + + private void printStaticInfo(JoinPoint.StaticPart + joinPointStaticPart) { + Tester.check(null != joinPointStaticPart, "null parm"); + Tester.event("printed"); + } +} |