Skip to content

Commit 8353b9c

Browse files
authored
Merge pull request #731 from JoaoGFarias/patch-1
Removing commented out code in JSONObject optDouble()
2 parents fe22b24 + 0d436d9 commit 8353b9c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/org/json/JSONObject.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,11 +1290,7 @@ public double optDouble(String key, double defaultValue) {
12901290
if (val == null) {
12911291
return defaultValue;
12921292
}
1293-
final double doubleValue = val.doubleValue();
1294-
// if (Double.isNaN(doubleValue) || Double.isInfinite(doubleValue)) {
1295-
// return defaultValue;
1296-
// }
1297-
return doubleValue;
1293+
return val.doubleValue();
12981294
}
12991295

13001296
/**

0 commit comments

Comments
 (0)