Fix a typo in the name of JsonUtf8Writer.

This commit is contained in:
jwilson
2017-02-03 13:02:18 -05:00
parent 81aed974c6
commit 5ea65a5f95
5 changed files with 6 additions and 6 deletions

View File

@@ -422,7 +422,7 @@ public abstract class JsonReader implements Closeable {
ByteString[] result = new ByteString[strings.length];
Buffer buffer = new Buffer();
for (int i = 0; i < strings.length; i++) {
JsonUt8Writer.string(buffer, strings[i]);
JsonUtf8Writer.string(buffer, strings[i]);
buffer.readByte(); // Skip the leading double quote (but leave the trailing one).
result[i] = buffer.readByteString();
}

View File

@@ -27,7 +27,7 @@ import static com.squareup.moshi.JsonScope.NONEMPTY_ARRAY;
import static com.squareup.moshi.JsonScope.NONEMPTY_DOCUMENT;
import static com.squareup.moshi.JsonScope.NONEMPTY_OBJECT;
final class JsonUt8Writer extends JsonWriter {
final class JsonUtf8Writer extends JsonWriter {
/*
* From RFC 7159, "All Unicode characters may be placed within the
@@ -62,7 +62,7 @@ final class JsonUt8Writer extends JsonWriter {
private String deferredName;
JsonUt8Writer(BufferedSink sink) {
JsonUtf8Writer(BufferedSink sink) {
if (sink == null) {
throw new NullPointerException("sink == null");
}

View File

@@ -138,7 +138,7 @@ public abstract class JsonWriter implements Closeable, Flushable {
/** Returns a new instance that writes UTF-8 encoded JSON to {@code sink}. */
public static JsonWriter of(BufferedSink sink) {
return new JsonUt8Writer(sink);
return new JsonUtf8Writer(sink);
}
JsonWriter() {

View File

@@ -35,7 +35,7 @@ abstract class JsonCodecFactory {
@Override JsonWriter newWriter() {
buffer = new Buffer();
return new JsonUt8Writer(buffer);
return new JsonUtf8Writer(buffer);
}
@Override String json() {

View File

@@ -21,7 +21,7 @@ import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public final class JsonUt8WriterTest {
public final class JsonUtf8WriterTest {
@Test public void prettyPrintObject() throws IOException {
Buffer buffer = new Buffer();
JsonWriter writer = JsonWriter.of(buffer);