mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Updating to work with java 1.6
This commit is contained in:
@@ -40,14 +40,14 @@ public class JSONBuilder {
|
|||||||
* <li>{@code String.class} -> Identity function</li>
|
* <li>{@code String.class} -> Identity function</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
private static final Map<Class<?>, TypeConverter<?>> classMapping = new HashMap<>();
|
private static final Map<Class<?>, TypeConverter<?>> classMapping = new HashMap<Class<?>, TypeConverter<?>>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A mapping from collection interface types to suppliers that produce
|
* A mapping from collection interface types to suppliers that produce
|
||||||
* instances of concrete collection implementations.
|
* instances of concrete collection implementations.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final Map<Class<?>, InstanceCreator<?>> collectionMapping = new HashMap<>();
|
private static final Map<Class<?>, InstanceCreator<?>> collectionMapping = new HashMap<Class<?>, InstanceCreator<?>>();
|
||||||
|
|
||||||
// Static initializer block to populate default mappings
|
// Static initializer block to populate default mappings
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -3283,7 +3283,13 @@ public class JSONObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (InstantiationException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
throw new JSONException(e);
|
throw new JSONException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3331,7 +3337,13 @@ public class JSONObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return collection;
|
return collection;
|
||||||
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (InstantiationException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
throw new JSONException(e);
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
throw new JSONException(e);
|
throw new JSONException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user