adding null parameter check to name(), fixing the issue and being consistent with superclass behavior
This commit is contained in:
parent
fa947212e0
commit
55acc23d86
|
@ -130,6 +130,9 @@ public final class JsonTreeWriter extends JsonWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public JsonWriter name(String name) throws IOException {
|
@Override public JsonWriter name(String name) throws IOException {
|
||||||
|
if (name == null) {
|
||||||
|
throw new NullPointerException("name == null");
|
||||||
|
}
|
||||||
if (stack.isEmpty() || pendingName != null) {
|
if (stack.isEmpty() || pendingName != null) {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user