@@ -680,11 +680,11 @@ private static void installExternal(AttachmentProvider.Accessor.ExternalAttachme
680
680
inputStream .close ();
681
681
}
682
682
}
683
- StringBuilder classPath = new StringBuilder ().append (quote ( (selfResolvedJar == null
683
+ StringBuilder classPath = new StringBuilder ().append ((selfResolvedJar == null
684
684
? attachmentJar
685
- : selfResolvedJar ).getCanonicalPath ())) ;
685
+ : selfResolvedJar ).getCanonicalPath ());
686
686
for (File jar : externalAttachment .getClassPath ()) {
687
- classPath .append (File .pathSeparatorChar ).append (quote ( jar .getCanonicalPath () ));
687
+ classPath .append (File .pathSeparatorChar ).append (jar .getCanonicalPath ());
688
688
}
689
689
if (new ProcessBuilder (System .getProperty (JAVA_HOME )
690
690
+ File .separatorChar + "bin"
@@ -694,7 +694,7 @@ private static void installExternal(AttachmentProvider.Accessor.ExternalAttachme
694
694
Attacher .class .getName (),
695
695
externalAttachment .getVirtualMachineType (),
696
696
processId ,
697
- quote ( agent .getAbsolutePath () ),
697
+ agent .getAbsolutePath (),
698
698
Boolean .toString (isNative ),
699
699
argument == null ? "" : ("=" + argument )).start ().waitFor () != SUCCESSFUL_ATTACH ) {
700
700
throw new IllegalStateException ("Could not self-attach to current VM using external process" );
@@ -742,18 +742,6 @@ private static File trySelfResolve() {
742
742
}
743
743
}
744
744
745
- /**
746
- * Quotes a value if it contains a white space.
747
- *
748
- * @param value The value to quote.
749
- * @return The value being quoted if necessary.
750
- */
751
- private static String quote (String value ) {
752
- return value .contains (" " )
753
- ? '"' + value + '"'
754
- : value ;
755
- }
756
-
757
745
/**
758
746
* Performs the actual lookup of the {@link java.lang.instrument.Instrumentation} from an installed
759
747
* Byte Buddy agent and returns the instance, or returns {@code null} if not present.
0 commit comments