Fixing the Java 1.5 build.
This commit is contained in:
parent
747e3c3051
commit
202bbfeef0
@ -748,7 +748,7 @@ public final class JsonReader implements Closeable {
|
||||
checkLenient();
|
||||
pos--;
|
||||
name = nextLiteral();
|
||||
if (name.isEmpty()) {
|
||||
if (name.length() == 0) {
|
||||
throw syntaxError("Expected name");
|
||||
}
|
||||
}
|
||||
@ -1071,7 +1071,7 @@ public final class JsonReader implements Closeable {
|
||||
*/
|
||||
private JsonToken readLiteral() throws IOException {
|
||||
String literal = nextLiteral();
|
||||
if (literal.isEmpty()) {
|
||||
if (literal.length() == 0) {
|
||||
throw syntaxError("Expected literal value");
|
||||
}
|
||||
value = literal;
|
||||
|
@ -165,7 +165,7 @@ public final class JsonWriter implements Closeable {
|
||||
* @param indent a string containing only whitespace.
|
||||
*/
|
||||
public void setIndent(String indent) {
|
||||
if (indent.isEmpty()) {
|
||||
if (indent.length() == 0) {
|
||||
this.indent = null;
|
||||
this.separator = ":";
|
||||
} else {
|
||||
|
@ -178,7 +178,7 @@ public final class JsonWriterTest extends TestCase {
|
||||
jsonWriter.value(Double.MIN_VALUE);
|
||||
jsonWriter.value(0.0);
|
||||
jsonWriter.value(-0.5);
|
||||
jsonWriter.value(Double.MIN_NORMAL);
|
||||
jsonWriter.value(2.2250738585072014E-308);
|
||||
jsonWriter.value(Math.PI);
|
||||
jsonWriter.value(Math.E);
|
||||
jsonWriter.endArray();
|
||||
|
Loading…
Reference in New Issue
Block a user