mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix code
This commit is contained in:
@@ -1,14 +1,5 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.Console;
|
||||
@@ -17,6 +8,14 @@ import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.json.test.bean.Exam;
|
||||
import cn.hutool.json.test.bean.JsonNode;
|
||||
import cn.hutool.json.test.bean.KeyBean;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* JSONArray单元测试
|
||||
@@ -121,6 +120,7 @@ public class JSONArrayTest {
|
||||
String jsonStr = FileUtil.readString("exam_test.json", CharsetUtil.CHARSET_UTF_8);
|
||||
JSONArray array = JSONUtil.parseArray(jsonStr);
|
||||
|
||||
//noinspection SuspiciousToArrayCall
|
||||
Exam[] list = array.toArray(new Exam[0]);
|
||||
Assert.assertNotEquals(0, list.length);
|
||||
Assert.assertEquals(Exam.class, list[0].getClass());
|
||||
|
@@ -74,7 +74,7 @@ public class ResultDto<T> implements Serializable {
|
||||
* @param message the message
|
||||
* @param result the result
|
||||
*/
|
||||
ResultDto(int code, String message, T result) {
|
||||
public ResultDto(int code, String message, T result) {
|
||||
super();
|
||||
this.code(code).message(message).result(result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user