This commit is contained in:
Looly 2023-02-24 16:22:30 +08:00
parent 4842974b0d
commit ad8b6c3d28
2 changed files with 19 additions and 1 deletions

View File

@ -1,5 +1,7 @@
package cn.hutool.core.lang.mutable; package cn.hutool.core.lang.mutable;
import cn.hutool.core.util.ObjUtil;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -61,7 +63,7 @@ public class MutableObj<T> implements Mutable<T>, Serializable{
} }
if (this.getClass() == obj.getClass()) { if (this.getClass() == obj.getClass()) {
final MutableObj<?> that = (MutableObj<?>) obj; final MutableObj<?> that = (MutableObj<?>) obj;
return this.value.equals(that.value); return ObjUtil.equals(this.value, that.value);
} }
return false; return false;
} }

View 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());
}
}