mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
add test
This commit is contained in:
parent
4842974b0d
commit
ad8b6c3d28
@ -1,5 +1,7 @@
|
||||
package cn.hutool.core.lang.mutable;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@ -61,7 +63,7 @@ public class MutableObj<T> implements Mutable<T>, Serializable{
|
||||
}
|
||||
if (this.getClass() == obj.getClass()) {
|
||||
final MutableObj<?> that = (MutableObj<?>) obj;
|
||||
return this.value.equals(that.value);
|
||||
return ObjUtil.equals(this.value, that.value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
16
hutool-json/src/test/java/cn/hutool/json/Issue2924Test.java
Normal file
16
hutool-json/src/test/java/cn/hutool/json/Issue2924Test.java
Normal file
@ -0,0 +1,16 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Issue2924Test {
|
||||
|
||||
@Test
|
||||
public void toListTest(){
|
||||
final String idsJsonString = "[1174,137,1172,210,1173,627,628]";
|
||||
final List<Integer> idList = JSONUtil.toList(idsJsonString,Integer.class);
|
||||
Assert.assertEquals("[1174, 137, 1172, 210, 1173, 627, 628]", idList.toString());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user