Skip to content

Commit 6b25cfc

Browse files
committed
Line ending fix for readResourceAsString
1 parent 6ca31fe commit 6b25cfc

File tree

1 file changed

+1
-3
lines changed
  • convex-core/src/main/java/convex/core/util

1 file changed

+1
-3
lines changed

convex-core/src/main/java/convex/core/util/Utils.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,7 @@ public static long toLong(Object v) {
720720
*/
721721
public static String readResourceAsString(String path) throws IOException {
722722
try (InputStream inputStream = getResourceAsStream(path)) {
723-
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
724-
return reader.lines().collect(Collectors.joining(System.lineSeparator()));
725-
}
723+
return new String(inputStream.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8);
726724
}
727725
}
728726

0 commit comments

Comments
 (0)