From 3997a90d584e2f2cd0fea9e514b2b8984b835c0f Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Fri, 7 Jul 2017 12:24:27 -0400 Subject: [PATCH] update constructor call to match Android implementation --- Property.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Property.java b/Property.java index de3e5dd..ff33a04 100644 --- a/Property.java +++ b/Property.java @@ -40,7 +40,9 @@ public class Property { * @throws JSONException */ public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException { - JSONObject jo = new JSONObject(properties == null ? 0 : properties.size()); + // can't use the new constructor for Android support + // JSONObject jo = new JSONObject(properties == null ? 0 : properties.size()); + JSONObject jo = new JSONObject(); if (properties != null && !properties.isEmpty()) { Enumeration enumProperties = properties.propertyNames(); while(enumProperties.hasMoreElements()) {