修复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

@ -3,7 +3,7 @@
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
# 5.8.13.M1 (2023-02-22) # 5.8.13.M1 (2023-02-24)
### 🐣新特性 ### 🐣新特性
### 🐞Bug修复 ### 🐞Bug修复
@ -16,6 +16,7 @@
* 【core 】 修复Tailer文件内容跟随在调用stop后文件依旧被占用问题issue#I6GFD2@Gitee * 【core 】 修复Tailer文件内容跟随在调用stop后文件依旧被占用问题issue#I6GFD2@Gitee
* 【core 】 修复ReflectUtil.invokeRaw方法中参数类型转换动作未生效的问题pr#2912@Github * 【core 】 修复ReflectUtil.invokeRaw方法中参数类型转换动作未生效的问题pr#2912@Github
* 【core 】 修复isXXX转换时的匹配问题issue#I6H0XF@Gitee * 【core 】 修复isXXX转换时的匹配问题issue#I6H0XF@Gitee
* 【core 】 修复MutableObj.equals空指针问题
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------

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