Skip to content

Commit

Permalink
Clarify doc about non-finite numbers for non-lenient JsonReader (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Aug 8, 2022
1 parent a4bc6c1 commit d53b3ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gson/src/main/java/com/google/gson/stream/JsonReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,9 @@ public void nextNull() throws IOException {
*
* @throws IllegalStateException if the next token is not a literal value.
* @throws NumberFormatException if the next literal value cannot be parsed
* as a double, or is non-finite.
* as a double.
* @throws MalformedJsonException if the next literal value is NaN or Infinity
* and this reader is not {@link #setLenient(boolean) lenient}.
*/
public double nextDouble() throws IOException {
int p = peeked;
Expand Down

0 comments on commit d53b3ea

Please sign in to comment.