Skip to content

Commit 4965267

Browse files
committed
Issue #35 - use standard charsets
1 parent 42ae46a commit 4965267

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/googlecode/protobuf/format/JsonJacksonFormat.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3636
import java.io.OutputStreamWriter;
3737
import java.math.BigInteger;
3838
import java.nio.charset.Charset;
39+
import java.nio.charset.StandardCharsets;
3940
import java.util.Iterator;
4041
import java.util.List;
4142
import java.util.Locale;
@@ -146,7 +147,7 @@ public void merge(JsonParser parser,
146147

147148

148149
protected JsonGenerator createGenerator(OutputStream output) throws IOException {
149-
return createGenerator(output, Charset.forName(JsonEncoding.UTF8.getJavaName()));
150+
return createGenerator(output, StandardCharsets.UTF_8);
150151
}
151152

152153
private JsonGenerator createGenerator(OutputStream output, Charset cs) throws IOException {

0 commit comments

Comments
 (0)