]> source.dussan.org Git - aspectj.git/commitdiff
tests harness' handling of code calling System.exit
authorwisberg <wisberg>
Sat, 31 May 2003 22:09:53 +0000 (22:09 +0000)
committerwisberg <wisberg>
Sat, 31 May 2003 22:09:53 +0000 (22:09 +0000)
tests/harness/systemExit/SystemExit.java [new file with mode: 0644]

diff --git a/tests/harness/systemExit/SystemExit.java b/tests/harness/systemExit/SystemExit.java
new file mode 100644 (file)
index 0000000..612fa74
--- /dev/null
@@ -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