We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c870094 commit 4865f51Copy full SHA for 4865f51
1 file changed
JSONObject.java
@@ -767,9 +767,9 @@ public JSONObject increment(String key) throws JSONException {
767
} else if (value instanceof Long) {
768
this.put(key, ((Long) value).longValue() + 1L);
769
} else if (value instanceof Double) {
770
- this.put(key, ((Double) value).doubleValue() + 1D);
+ this.put(key, ((Double) value).doubleValue() + 1.0d);
771
} else if (value instanceof Float) {
772
- this.put(key, ((Float) value).floatValue() + 1F);
+ this.put(key, ((Float) value).floatValue() + 1.0f);
773
} else {
774
throw new JSONException("Unable to increment [" + quote(key) + "].");
775
}
0 commit comments