From 4865f51dd517e4ef78051fce2c5c24bdaa7cc3e6 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Tue, 16 May 2017 15:38:54 -0400 Subject: [PATCH] change float double literals to be more standard as 1.0f and 1.0d respectively --- JSONObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JSONObject.java b/JSONObject.java index f58f2dc..512e4ae 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -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) + "]."); }