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