mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Read text input streams as UTF-8 in Java (#6999)
Fixes https://errorprone.info/bugpattern/DefaultCharset for InputStreamReader instances.
This commit is contained in:
@@ -95,7 +95,7 @@ public final class ClassPreloader {
|
||||
* @return Number of classes loaded.
|
||||
*/
|
||||
public static int preload(InputStream stream) {
|
||||
return preload(new BufferedReader(new InputStreamReader(stream)));
|
||||
return preload(new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user