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:
parent
c870094f69
commit
4865f51dd5
1 changed files with 2 additions and 2 deletions
|
@ -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) + "].");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue