Skip to content

Commit

Permalink
Fixing google#1592
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 Nov 26, 2019
1 parent 4109aaa commit e843963
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 e843963

Please sign in to comment.