Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adding null parameter check to name(), fixing the issue and being consistent with superclass behavior
  • Loading branch information
fmmmlee authored and tibor-universe committed Mar 22, 2021
1 parent 9c7f658 commit e38a646
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -130,6 +130,9 @@ private void put(JsonElement value) {
}

@Override public JsonWriter name(String name) throws IOException {
if (name == null) {
throw new NullPointerException("name == null");
}
if (stack.isEmpty() || pendingName != null) {
throw new IllegalStateException();
}
Expand Down

0 comments on commit e38a646

Please sign in to comment.