1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00

change float double literals to be more standard as 1.0f and 1.0d respectively

This commit is contained in:
John J. Aylward 2017-05-16 15:38:54 -04:00
parent c870094f69
commit 4865f51dd5

View file

@ -767,9 +767,9 @@ public class JSONObject {
} else if (value instanceof Long) {
this.put(key, ((Long) value).longValue() + 1L);
} else if (value instanceof Double) {
this.put(key, ((Double) value).doubleValue() + 1D);
this.put(key, ((Double) value).doubleValue() + 1.0d);
} else if (value instanceof Float) {
this.put(key, ((Float) value).floatValue() + 1F);
this.put(key, ((Float) value).floatValue() + 1.0f);
} else {
throw new JSONException("Unable to increment [" + quote(key) + "].");
}