aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-31 22:09:53 +0000
committerwisberg <wisberg>2003-05-31 22:09:53 +0000
commit02a2fdd335bd206c30a11e1653795a704718486c (patch)
tree44bbd3b18f0ed3eaabd8714ac70edc454580c2f5
parentfc011ca05ef63f2c7a42d64d738936977380ea28 (diff)
downloadaspectj-02a2fdd335bd206c30a11e1653795a704718486c.tar.gz
aspectj-02a2fdd335bd206c30a11e1653795a704718486c.zip
tests harness' handling of code calling System.exit
-rw-r--r--tests/harness/systemExit/SystemExit.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/harness/systemExit/SystemExit.java b/tests/harness/systemExit/SystemExit.java
new file mode 100644
index 000000000..612fa74a2
--- /dev/null
+++ b/tests/harness/systemExit/SystemExit.java
@@ -0,0 +1,16 @@
+
+public class SystemExit {
+
+ /**
+ * Exit via System.exit(int);
+ * @param args null/empty String[], or integer exit value in args[0]
+ * @throws Exception
+ */
+ public static void main(String[] args) throws Exception {
+ int result = 0;
+ if ((null != args) && (0 < args.length)) {
+ result = Integer.valueOf(args[0]).intValue();
+ }
+ System.exit(result);
+ }
+} \ No newline at end of file