Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8274003: ProcessHandleImpl.Info toString has an if check which is alw…
…ays true

Reviewed-by: bpb, naoto, iris
  • Loading branch information
Roger Riggs committed Sep 22, 2021
1 parent 0a36163 commit 33df388
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/lang/ProcessHandleImpl.java
Expand Up @@ -642,27 +642,27 @@ public String toString() {
sb.append(user());
}
if (command != null) {
if (sb.length() != 0) sb.append(", ");
if (sb.length() > 1) sb.append(", ");
sb.append("cmd: ");
sb.append(command);
}
if (arguments != null && arguments.length > 0) {
if (sb.length() != 0) sb.append(", ");
if (sb.length() > 1) sb.append(", ");
sb.append("args: ");
sb.append(Arrays.toString(arguments));
}
if (commandLine != null) {
if (sb.length() != 0) sb.append(", ");
if (sb.length() > 1) sb.append(", ");
sb.append("cmdLine: ");
sb.append(commandLine);
}
if (startTime > 0) {
if (sb.length() != 0) sb.append(", ");
if (sb.length() > 1) sb.append(", ");
sb.append("startTime: ");
sb.append(startInstant());
}
if (totalTime != -1) {
if (sb.length() != 0) sb.append(", ");
if (sb.length() > 1) sb.append(", ");
sb.append("totalTime: ");
sb.append(totalCpuDuration().toString());
}
Expand Down

1 comment on commit 33df388

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.