Incorporated code review from r949
This commit is contained in:
parent
a3ca4e1312
commit
b5ae3c945a
@ -300,7 +300,11 @@ public final class TypeAdapters {
|
|||||||
in.nextNull();
|
in.nextNull();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return in.nextString().charAt(0);
|
String str = in.nextString();
|
||||||
|
if (str.length() != 1) {
|
||||||
|
throw new JsonSyntaxException("Expecting character, got: " + str);
|
||||||
|
}
|
||||||
|
return str.charAt(0);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void write(JsonWriter out, Character value) throws IOException {
|
public void write(JsonWriter out, Character value) throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user