diff --git a/core/src/main/java/hudson/console/ConsoleNote.java b/core/src/main/java/hudson/console/ConsoleNote.java index fb39d6968db3..e5ace269ff1f 100644 --- a/core/src/main/java/hudson/console/ConsoleNote.java +++ b/core/src/main/java/hudson/console/ConsoleNote.java @@ -194,8 +194,7 @@ public void encodeTo(OutputStream out) throws IOException { * encoding is ASCII compatible. */ public void encodeTo(Writer out) throws IOException { - String writeUTF8 = new String(encodeToBytes().toByteArray(), StandardCharsets.UTF_8); - out.write(writeUTF8); + out.write(new String(encodeToBytes().toByteArray(), StandardCharsets.UTF_8)); } private ByteArrayOutputStream encodeToBytes() throws IOException {