test(#901): call JsonArray.putAll with a casted list as object

This commit is contained in:
Lucas Nascimento 2024-10-05 11:39:26 -03:00 committed by GitHub
parent 14f71274f7
commit 0d71dcf713
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,6 +259,11 @@ public class JSONArrayTest {
jsonArray.length(),
len);
// collection as object
@SuppressWarnings("RedundantCast")
Object myListAsObject = (Object) myList;
jsonArray.putAll(myListAsObject);
for (int i = 0; i < myList.size(); i++) {
assertEquals("collection elements should be equal",
myList.get(i),