Skip to content
Permalink
Browse files
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 33df388a24267e868574e4604b2e2ab170dc5a09
Showing 1 changed file with 5 additions and 5 deletions.
@@ -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());
}

1 comment on commit 33df388

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 33df388 Sep 22, 2021

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.