Skip to content

Commit 0d71dcf

Browse files
authored
test(stleary#901): call JsonArray.putAll with a casted list as object
1 parent 14f7127 commit 0d71dcf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/java/org/json/junit/JSONArrayTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ public void verifyPutAll() {
259259
jsonArray.length(),
260260
len);
261261

262+
// collection as object
263+
@SuppressWarnings("RedundantCast")
264+
Object myListAsObject = (Object) myList;
265+
jsonArray.putAll(myListAsObject);
266+
262267
for (int i = 0; i < myList.size(); i++) {
263268
assertEquals("collection elements should be equal",
264269
myList.get(i),

0 commit comments

Comments
 (0)