changeset 10201:7b662a967f74

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 78290d029b4d
children 4f11e558f9ee
files test/com/sun/jdi/ExclusiveBind.java test/com/sun/jdi/VMConnection.java
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/com/sun/jdi/ExclusiveBind.java	Mon Jun 30 18:17:46 2014 -0700
+++ b/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/test/com/sun/jdi/VMConnection.java	Mon Jun 30 18:17:46 2014 -0700
+++ b/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;
         }