Clarify doc about non-finite numbers for non-lenient JsonReader (#1723)

This commit is contained in:
Marcono1234 2022-08-08 15:40:07 +02:00 committed by GitHub
parent a4bc6c17d7
commit d53b3ea84a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -890,7 +890,9 @@ public class JsonReader implements Closeable {
*
* @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;