Skip to content

Commit

Permalink
Avoid string concatenation with Runtime.getRuntime().exec(..).
Browse files Browse the repository at this point in the history
- Also remove foo.xml

Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Jan 12, 2024
1 parent c971205 commit bfafff4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Empty file removed org.eclipse.jdt.ls.core/foo.xml
Empty file.
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

0 comments on commit bfafff4

Please sign in to comment.