mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -18,17 +18,6 @@ public class JSONNull implements Serializable{
|
||||
*/
|
||||
public static final JSONNull NULL = new JSONNull();
|
||||
|
||||
/**
|
||||
* There is only intended to be a single instance of the NULL object, so the clone method returns itself.
|
||||
*克隆方法只返回本身,此对象是个单例对象
|
||||
*
|
||||
* @return NULL.
|
||||
*/
|
||||
@Override
|
||||
protected final Object clone() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A Null object is equal to the null value and to itself.
|
||||
* 对象与其本身和<code>null</code>值相等
|
||||
@@ -38,7 +27,7 @@ public class JSONNull implements Serializable{
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return object == null || object == this;
|
||||
return object == null || (object instanceof JSONNull && object == this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -17,7 +17,6 @@ import cn.hutool.json.serialize.JSONObjectSerializer;
|
||||
import cn.hutool.json.serialize.JSONSerializer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Method;
|
||||
import java.math.BigDecimal;
|
||||
|
Reference in New Issue
Block a user