mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -97,7 +97,7 @@ public class GlobalSerializeMapping {
|
||||
* @return 自定义的序列化器或者{@code null}
|
||||
*/
|
||||
public static JSONSerializer<? extends JSON, ?> getSerializer(final Type type) {
|
||||
if (null == serializerMap) {
|
||||
if (null == serializerMap || null == type) {
|
||||
return null;
|
||||
}
|
||||
return serializerMap.get(ObjUtil.defaultIfNull(type, NullType.INSTANCE));
|
||||
@@ -110,7 +110,7 @@ public class GlobalSerializeMapping {
|
||||
* @return 自定义的反序列化器或者{@code null}
|
||||
*/
|
||||
public static JSONDeserializer<?> getDeserializer(final Type type) {
|
||||
if (null == deserializerMap) {
|
||||
if (null == deserializerMap || null == type) {
|
||||
return null;
|
||||
}
|
||||
return deserializerMap.get(ObjUtil.defaultIfNull(type, NullType.INSTANCE));
|
||||
|
Reference in New Issue
Block a user