changeset 122:833f68a6ba34 tip

7902371: JOL hangs with empty classpath
author shade
date Thu, 24 Jan 2019 21:09:26 +0100
parents bf211aec9c07
children
files jol-core/src/main/java/org/openjdk/jol/vm/sa/ServiceabilityAgentSupport.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jol-core/src/main/java/org/openjdk/jol/vm/sa/ServiceabilityAgentSupport.java	Thu Jan 17 19:34:56 2019 +0100
+++ b/jol-core/src/main/java/org/openjdk/jol/vm/sa/ServiceabilityAgentSupport.java	Thu Jan 24 21:09:26 2019 +0100
@@ -290,8 +290,10 @@
                 throw new IllegalStateException("Unhandled style: " + style);
         }
 
-        args.add("-cp");
-        args.add(classPath);
+        if (!classPath.isEmpty()) {
+            args.add("-cp");
+            args.add(classPath);
+        }
         return args;
     }