diff options
author | wisberg <wisberg> | 2004-04-05 09:24:57 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2004-04-05 09:24:57 +0000 |
commit | 8bf5e26fddd79c3625b929104e398990bc2d4886 (patch) | |
tree | 265cdd54dab3a4cf331d20568a8f03c28acdeb9f /tests/bugs | |
parent | b2befd4b1fcc89ae80553f3aabcb55ca89e50902 (diff) | |
download | aspectj-8bf5e26fddd79c3625b929104e398990bc2d4886.tar.gz aspectj-8bf5e26fddd79c3625b929104e398990bc2d4886.zip |
@testcase PR#57432 NPE's when writing some declare error
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/systemouts/A.java | 7 | ||||
-rw-r--r-- | tests/bugs/systemouts/injar.jar | bin | 0 -> 653 bytes | |||
-rw-r--r-- | tests/bugs/systemouts/src/build.xml | 22 | ||||
-rw-r--r-- | tests/bugs/systemouts/src/pack/X.java | 43 |
4 files changed, 72 insertions, 0 deletions
diff --git a/tests/bugs/systemouts/A.java b/tests/bugs/systemouts/A.java new file mode 100644 index 000000000..6e475b725 --- /dev/null +++ b/tests/bugs/systemouts/A.java @@ -0,0 +1,7 @@ + +/** @testcase PR#57432 NPE's when writing some declare error */ +aspect A { + declare error : get(java.io.PrintStream System.out) + || call(void Throwable.printStackTrace(..)) + : "NPE"; +} diff --git a/tests/bugs/systemouts/injar.jar b/tests/bugs/systemouts/injar.jar Binary files differnew file mode 100644 index 000000000..bc76a0af2 --- /dev/null +++ b/tests/bugs/systemouts/injar.jar diff --git a/tests/bugs/systemouts/src/build.xml b/tests/bugs/systemouts/src/build.xml new file mode 100644 index 000000000..065fcf4e2 --- /dev/null +++ b/tests/bugs/systemouts/src/build.xml @@ -0,0 +1,22 @@ +<project name="extdirs-setup" basedir="." default="injar.jar"> + + <target name="injar.jar"> + <property + name="classes.dir" + location="${basedir}/../classes"/> + + <mkdir dir="${classes.dir}"/> + <delete dir="${classes.dir}"/> + <mkdir dir="${classes.dir}"/> + <javac + destdir="${classes.dir}" + includes="pack/X.java" + srcdir="${basedir}"/> + <zip + destfile="${basedir}/../injar.jar"> + <fileset dir="${classes.dir}"/> + </zip> + <delete dir="${classes.dir}"/> + </target> + +</project>
\ No newline at end of file diff --git a/tests/bugs/systemouts/src/pack/X.java b/tests/bugs/systemouts/src/pack/X.java new file mode 100644 index 000000000..29803554c --- /dev/null +++ b/tests/bugs/systemouts/src/pack/X.java @@ -0,0 +1,43 @@ + +package pack; + +public final class X { + + public static void ut(boolean b, String m) { + if (!b) { + try { + if (b) + return; + } catch (RuntimeException e) { + System.out.println(""); + e.printStackTrace(System.out); + } + } + } + + + public static void printArgs(String programName, String[] args) { + System.out.print(programName); + for (int i=0; i<args.length; i++){ + System.out.print(" "); + System.out.print(args[i]); + } + } + static void t() { + System.out.print("s"); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.print('.'); + System.out.flush(); + System.out.println(""); + } +} |