From 3571d739a187e465513cb297c7da7a2525c575b3 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 8 Jul 2008 06:14:41 +0000 Subject: [PATCH] fix test assertion --- bindings/java/src/org/hyperic/sigar/test/TestProcArgs.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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")) {