Use ByteArrayOutputStream.toString where possible

See gh-32534
This commit is contained in:
dreis2211
2022-09-29 10:45:02 +02:00
committed by Stephane Nicoll
parent a036b30822
commit 65ef8fc51a
4 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -144,7 +144,7 @@ class LayersIndexTests {
private String getContent() throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
this.actual.writeTo(out);
return new String(out.toByteArray(), StandardCharsets.UTF_8);
return out.toString(StandardCharsets.UTF_8);
}
}