Use ByteArrayOutputStream.toString where possible
See gh-32534
This commit is contained in:
committed by
Stephane Nicoll
parent
a036b30822
commit
65ef8fc51a
@@ -71,7 +71,7 @@ public class DefaultLaunchScript implements LaunchScript {
|
||||
try {
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
copy(inputStream, outputStream);
|
||||
return new String(outputStream.toByteArray(), StandardCharsets.UTF_8);
|
||||
return outputStream.toString(StandardCharsets.UTF_8);
|
||||
}
|
||||
finally {
|
||||
inputStream.close();
|
||||
|
||||
Reference in New Issue
Block a user