mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8290300: Use standard String-joining tools where applicable
Reviewed-by: naoto, rriggs, dfuchs
This commit is contained in:
parent
f9004fe443
commit
9a65524e2f
4 changed files with 6 additions and 18 deletions
|
@ -34,7 +34,6 @@ import java.util.Arrays;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
import jdk.internal.event.ProcessStartEvent;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
|
@ -1114,12 +1113,8 @@ public final class ProcessBuilder
|
|||
redirectErrorStream);
|
||||
ProcessStartEvent event = new ProcessStartEvent();
|
||||
if (event.isEnabled()) {
|
||||
StringJoiner command = new StringJoiner(" ");
|
||||
for (String s: cmdarray) {
|
||||
command.add(s);
|
||||
}
|
||||
event.directory = dir;
|
||||
event.command = command.toString();
|
||||
event.command = String.join(" ", cmdarray);
|
||||
event.pid = process.pid();
|
||||
event.commit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue