examples: fix errorprone warning about charset

This commit is contained in:
Carl Mastrangelo 2017-07-17 15:35:08 -07:00 committed by GitHub
parent e60a179772
commit 6ea2b8aacb
1 changed files with 2 additions and 1 deletions

View File

@ -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);