Promote JsonReader2 to be the main JsonReader implementation.

This commit is contained in:
Jesse Wilson 2012-08-26 19:34:46 +00:00
parent 553fa6b742
commit e7bfd0c97d

View File

@ -187,7 +187,7 @@ import java.io.Reader;
* @author Jesse Wilson * @author Jesse Wilson
* @since 1.6 * @since 1.6
*/ */
public class JsonReader2 implements Closeable { public class JsonReader implements Closeable {
/** The only non-execute prefix this parser permits */ /** The only non-execute prefix this parser permits */
private static final char[] NON_EXECUTE_PREFIX = ")]}'\n".toCharArray(); private static final char[] NON_EXECUTE_PREFIX = ")]}'\n".toCharArray();
@ -257,7 +257,7 @@ public class JsonReader2 implements Closeable {
/** /**
* Creates a new instance that reads a JSON-encoded stream from {@code in}. * Creates a new instance that reads a JSON-encoded stream from {@code in}.
*/ */
public JsonReader2(Reader in) { public JsonReader(Reader in) {
if (in == null) { if (in == null) {
throw new NullPointerException("in == null"); throw new NullPointerException("in == null");
} }
@ -1442,7 +1442,7 @@ public class JsonReader2 implements Closeable {
pos += NON_EXECUTE_PREFIX.length; pos += NON_EXECUTE_PREFIX.length;
} }
/*static { static {
JsonReaderInternalAccess.INSTANCE = new JsonReaderInternalAccess() { JsonReaderInternalAccess.INSTANCE = new JsonReaderInternalAccess() {
@Override public void promoteNameToValue(JsonReader reader) throws IOException { @Override public void promoteNameToValue(JsonReader reader) throws IOException {
if (reader instanceof JsonTreeReader) { if (reader instanceof JsonTreeReader) {
@ -1465,5 +1465,5 @@ public class JsonReader2 implements Closeable {
} }
} }
}; };
}*/ }
} }