mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -197,14 +197,12 @@ public class JSONArrayTest {
|
||||
|
||||
@Test
|
||||
public void toListWithErrorTest() {
|
||||
// Assertions.assertThrows(JSONException.class, ()->{
|
||||
// });
|
||||
final String json = "[['aaa',{'akey':'avalue','bkey':'bvalue'}]]";
|
||||
final JSONArray ja = JSONUtil.parseArray(json);
|
||||
|
||||
final Object bean = ja.toBean(new TypeReference<List<List<KeyBean>>>() {});
|
||||
|
||||
Console.log(bean);
|
||||
Assertions.assertThrows(JSONException.class, ()->{
|
||||
final String json = "[['aaa',{'akey':'avalue','bkey':'bvalue'}]]";
|
||||
final JSONArray ja = JSONUtil.parseArray(json);
|
||||
final Object bean = ja.toBean(new TypeReference<List<List<KeyBean>>>() {});
|
||||
Console.log(bean);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user