mirror of https://github.com/grpc/grpc-java.git
examples: fix errorprone warning about charset
This commit is contained in:
parent
e60a179772
commit
6ea2b8aacb
|
@ -22,6 +22,7 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -57,7 +58,7 @@ public class RouteGuideUtil {
|
|||
public static List<Feature> parseFeatures(URL file) throws IOException {
|
||||
InputStream input = file.openStream();
|
||||
try {
|
||||
Reader reader = new InputStreamReader(input);
|
||||
Reader reader = new InputStreamReader(input, Charset.forName("UTF-8"));
|
||||
try {
|
||||
FeatureDatabase.Builder database = FeatureDatabase.newBuilder();
|
||||
JsonFormat.parser().merge(reader, database);
|
||||
|
|
Loading…
Reference in New Issue