summaryrefslogtreecommitdiffstats
path: root/tests/harness/systemExit/SystemExit.java
blob: 612fa74a2b6271d129b1adc96f599294d4ed89e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
    }
}