Skip to content

Commit

Permalink
Merge pull request #731 from JoaoGFarias/patch-1
Browse files Browse the repository at this point in the history
Removing commented out code in JSONObject optDouble()
  • Loading branch information
stleary committed Mar 12, 2023
2 parents fe22b24 + 0d436d9 commit 8353b9c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/org/json/JSONObject.java
Expand Up @@ -1290,11 +1290,7 @@ public double optDouble(String key, double defaultValue) {
if (val == null) {
return defaultValue;
}
final double doubleValue = val.doubleValue();
// if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue)) {
// return defaultValue;
// }
return doubleValue;
return val.doubleValue();
}

/**
Expand Down

0 comments on commit 8353b9c

Please sign in to comment.