8048687: [TESTBUG] com/sun/jdi/ExclusiveBind.java "Could not find or load main class"
authorsla
Tue, 01 Jul 2014 10:40:14 +0200
changeset 25180 36c18cc1bc60
parent 25179 ec71696ed1f5
child 25181 216e0899f503
8048687: [TESTBUG] com/sun/jdi/ExclusiveBind.java "Could not find or load main class" Reviewed-by: jbachorik, egahlin, dholmes
jdk/test/com/sun/jdi/ExclusiveBind.java
jdk/test/com/sun/jdi/VMConnection.java
--- a/jdk/test/com/sun/jdi/ExclusiveBind.java	Mon Jun 30 18:17:46 2014 -0700
+++ b/jdk/test/com/sun/jdi/ExclusiveBind.java	Tue Jul 01 10:40:14 2014 +0200
@@ -68,7 +68,9 @@
     private static ProcessBuilder prepareLauncher(String address, boolean suspend, String class_name) throws Exception {
         List<String> args = new ArrayList<>();
         for(String dbgOption : VMConnection.getDebuggeeVMOptions().split(" ")) {
-            args.add(dbgOption);
+            if (!dbgOption.trim().isEmpty()) {
+                args.add(dbgOption);
+            }
         }
         String lib = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=";
         if (suspend) {
--- a/jdk/test/com/sun/jdi/VMConnection.java	Mon Jun 30 18:17:46 2014 -0700
+++ b/jdk/test/com/sun/jdi/VMConnection.java	Tue Jul 01 10:40:14 2014 +0200
@@ -59,13 +59,13 @@
         retVal += "-classpath " + testClasses;
 
         String vmOpts = System.getProperty("test.vm.opts");
-        System.out.println("vmOpts: "+vmOpts);
-        if (vmOpts != null) {
+        System.out.println("vmOpts: '" + vmOpts + "'");
+        if (vmOpts != null && !vmOpts.trim().isEmpty()) {
             retVal += " " + vmOpts;
         }
         String javaOpts = System.getProperty("test.java.opts");
-        System.out.println("javaOpts: "+javaOpts);
-        if (javaOpts != null) {
+        System.out.println("javaOpts: '" + javaOpts + "'");
+        if (javaOpts != null && !javaOpts.trim().isEmpty()) {
             retVal += " " + javaOpts;
         }