Skip to content

Commit

Permalink
Revert "Merge pull request stleary#731 from JoaoGFarias/patch-1"
Browse files Browse the repository at this point in the history
This reverts commit 8353b9c, reversing
changes made to fe22b24.
  • Loading branch information
superMaaax committed Mar 22, 2023
1 parent c92bc6f commit 438996b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/json/JSONObject.java
Expand Up @@ -1290,7 +1290,11 @@ public double optDouble(String key, double defaultValue) {
if (val == null) {
return defaultValue;
}
return val.doubleValue();
final double doubleValue = val.doubleValue();
// if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue)) {
// return defaultValue;
// }
return doubleValue;
}

/**
Expand Down

0 comments on commit 438996b

Please sign in to comment.