Skip to content

Commit

Permalink
Fixing #1592 (#1623)
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 committed Mar 2, 2020
1 parent fa94721 commit 55acc23
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 55acc23

Please sign in to comment.