Skip to content

Commit b9baff6

Browse files
rbutcherjetersen
authored andcommitted
Fixing findBugs issues with default charset
1 parent 5c43bbe commit b9baff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jenkinsci/plugins/docker/workflow/client/WindowsDockerClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public Optional<String> getContainerIdIfContainerized() throws IOException, Inte
107107
public String whoAmI() throws IOException, InterruptedException {
108108
try (ByteArrayOutputStream userId = new ByteArrayOutputStream()) {
109109
launcher.launch().cmds("whoami").quiet(true).stdout(userId).start().joinWithTimeout(CLIENT_TIMEOUT, TimeUnit.SECONDS, launcher.getListener());
110-
return userId.toString();
110+
return userId.toString(Charset.defaultCharset().name()).trim();
111111
}
112112
}
113113

0 commit comments

Comments
 (0)