changeset 25180:36c18cc1bc60

8048687: [TESTBUG] com/sun/jdi/ExclusiveBind.java "Could not find or load main class" Reviewed-by: jbachorik, egahlin, dholmes
author sla
date Tue, 01 Jul 2014 10:40:14 +0200
parents ec71696ed1f5
children 216e0899f503
files jdk/test/com/sun/jdi/ExclusiveBind.java jdk/test/com/sun/jdi/VMConnection.java
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }