Skip to content

Commit

Permalink
fixing issue 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 22, 2019
1 parent 6967f3d commit 49280df
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 49280df

Please sign in to comment.