Skip to content

Commit

Permalink
Pass charset to InputStreamReader
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Adams <[email protected]>
  • Loading branch information
saraadams committed Dec 21, 2023
1 parent a47724e commit 1a9de97
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -77,7 +78,8 @@ public static BazelProfile createFromPath(String path) throws IllegalArgumentExc

public static BazelProfile createFromInputStream(InputStream inputStream)
throws IllegalArgumentException {
return new BazelProfile(new JsonReader(new InputStreamReader(inputStream)));
return new BazelProfile(
new JsonReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)));
}

private final BazelVersion bazelVersion;
Expand Down

0 comments on commit 1a9de97

Please sign in to comment.