diff options
author | aclement <aclement> | 2006-06-27 11:34:41 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-06-27 11:34:41 +0000 |
commit | 792d1dfd50e8b9ca5df70ea84c0b35de9cfba0f3 (patch) | |
tree | c183458e24f0b8c5b20020c97925191983f501c3 /tests | |
parent | d1be59a2e48808bc72dea4432dcf00ee50662e5e (diff) | |
download | aspectj-792d1dfd50e8b9ca5df70ea84c0b35de9cfba0f3.tar.gz aspectj-792d1dfd50e8b9ca5df70ea84c0b35de9cfba0f3.zip |
test/fix for 148786: new array joinpoint problem. tiny one line change, safe for committing post RC.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs152/pr148786/A.java | 11 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/ajc152.xml | 9 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs152/pr148786/A.java b/tests/bugs152/pr148786/A.java new file mode 100644 index 000000000..8250730b2 --- /dev/null +++ b/tests/bugs152/pr148786/A.java @@ -0,0 +1,11 @@ +public class A { + public static void main(String []argv) { + byte[][] bytes = new byte[][]{{0},{1}}; + } +} + +aspect X { + after() returning(Object o) : call(*[][].new(..)) { + System.err.println("new array: "+o.getClass()); + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index 17996d89e..e53fc4f4a 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -35,6 +35,7 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");} // public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");} // public void testClassCastForInvalidAnnotationValue_pr148537() { runTest("classcast annotation value");} + public void testFreakyNewArrayJoinpoint_pr148786() { runTest("freaky new array joinpoint"); } public void testPrivilegeGeneric_pr148545() { runTest("nosuchmethoderror for privileged aspect");} public void testPrivilegeGeneric_pr148545_2() { runTest("nosuchmethoderror for privileged aspect - 2");} public void testUnknownAnnotationNPE() { runTest("NPE for unknown annotation");} diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index 481e3243c..cbff0e3d1 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -783,4 +783,13 @@ <compile files="TheWholeShow.aj" options="-1.5"/> <run class="TheWholeShow"/> </ajc-test> + + <ajc-test dir="bugs152/pr148786" title="freaky new array joinpoint"> + <compile files="A.java" options="-Xjoinpoints:arrayconstruction"/> + <run class="A"> + <stderr> + <line text="new array: class [[B"/> + </stderr> + </run> + </ajc-test> </suite>
\ No newline at end of file |