Skip to content

Commit

Permalink
Avoid string concatenation with Runtime.getRuntime().exec(..).
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Jan 12, 2024
1 parent 492a32d commit 0e8e17b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ private boolean parentProcessStillRunning() {

String command;
if (Platform.OS_WIN32.equals(Platform.getOS())) {
command = "cmd /c \"tasklist /FI \"PID eq " + pid + "\" | findstr " + pid + "\"";
command = String.format("cmd /c \"tasklist /FI \"PID eq %1$d\" | findstr %1$d\"", pid);
} else {
command = "kill -0 " + pid;
command = String.format("kill -0 %d", pid);
}
Process process = null;
boolean finished = false;
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
</target>
</target>

0 comments on commit 0e8e17b

Please sign in to comment.