Skip to content

Commit 3997a90

Browse files
committed
update constructor call to match Android implementation
1 parent 1736a60 commit 3997a90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Property.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public class Property {
4040
* @throws JSONException
4141
*/
4242
public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException {
43-
JSONObject jo = new JSONObject(properties == null ? 0 : properties.size());
43+
// can't use the new constructor for Android support
44+
// JSONObject jo = new JSONObject(properties == null ? 0 : properties.size());
45+
JSONObject jo = new JSONObject();
4446
if (properties != null && !properties.isEmpty()) {
4547
Enumeration<?> enumProperties = properties.propertyNames();
4648
while(enumProperties.hasMoreElements()) {

0 commit comments

Comments
 (0)