mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-05 00:00:52 -05:00
Updating to work with java 1.6
This commit is contained in:
@@ -3450,9 +3450,9 @@ public class JSONObject {
|
||||
*/
|
||||
private Collection getCollection(Class<?> collectionType) throws JSONException {
|
||||
if (collectionType == List.class || collectionType == ArrayList.class) {
|
||||
return new ArrayList<>();
|
||||
return new ArrayList();
|
||||
} else if (collectionType == Set.class || collectionType == HashSet.class) {
|
||||
return new HashSet<>();
|
||||
return new HashSet();
|
||||
} else {
|
||||
throw new JSONException("Unsupported Collection type: " + collectionType.getName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user