diff --git a/bindings/java/src/org/hyperic/sigar/test/TestProcArgs.java b/bindings/java/src/org/hyperic/sigar/test/TestProcArgs.java index ee623aa8..aadab89c 100644 --- a/bindings/java/src/org/hyperic/sigar/test/TestProcArgs.java +++ b/bindings/java/src/org/hyperic/sigar/test/TestProcArgs.java @@ -59,7 +59,9 @@ public class TestProcArgs extends SigarTestCase { findArg(args, TestProcArgs.class.getName()); } - assertTrue(args[0].indexOf("java") != -1); + if (args.length > 0) { + assertTrue(args[0].indexOf("java") != -1); + } //hpux has a limit less than what these args will be if (!System.getProperty("os.name").equals("HP-UX")) {