修复MutableObj.equals空指针问题

This commit is contained in:
Looly
2023-02-24 15:44:38 +08:00
parent fe7751342e
commit 819bf98d50
2 changed files with 5 additions and 2 deletions

View File

@@ -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;
}