Skip to content

Commit 4865f51

Browse files
author
John J. Aylward
committed
change float double literals to be more standard as 1.0f and 1.0d respectively
1 parent c870094 commit 4865f51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

JSONObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,9 @@ public JSONObject increment(String key) throws JSONException {
767767
} else if (value instanceof Long) {
768768
this.put(key, ((Long) value).longValue() + 1L);
769769
} else if (value instanceof Double) {
770-
this.put(key, ((Double) value).doubleValue() + 1D);
770+
this.put(key, ((Double) value).doubleValue() + 1.0d);
771771
} else if (value instanceof Float) {
772-
this.put(key, ((Float) value).floatValue() + 1F);
772+
this.put(key, ((Float) value).floatValue() + 1.0f);
773773
} else {
774774
throw new JSONException("Unable to increment [" + quote(key) + "].");
775775
}

0 commit comments

Comments
 (0)