mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
GlobalSerializeMapping增加null检查
This commit is contained in:
parent
c459a0f613
commit
baac5d05d4
@ -2,10 +2,11 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.32(2024-08-29)
|
# 5.8.32(2024-08-30)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【core 】 FileUtil.getTotalLines()支持CR换行符(issue#IAMZYR@Gitee)
|
* 【core 】 FileUtil.getTotalLines()支持CR换行符(issue#IAMZYR@Gitee)
|
||||||
|
* 【json 】 GlobalSerializeMapping增加null检查(issue#IANH1Y@Gitee)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【http 】 修复getFileNameFromDisposition不符合规范问题(issue#IAKBPD@Gitee)
|
* 【http 】 修复getFileNameFromDisposition不符合规范问题(issue#IAKBPD@Gitee)
|
||||||
|
@ -91,7 +91,7 @@ public class GlobalSerializeMapping {
|
|||||||
* @return 自定义的序列化器或者{@code null}
|
* @return 自定义的序列化器或者{@code null}
|
||||||
*/
|
*/
|
||||||
public static JSONSerializer<? extends JSON, ?> getSerializer(Type type){
|
public static JSONSerializer<? extends JSON, ?> getSerializer(Type type){
|
||||||
if(null == serializerMap) {
|
if(null == type || null == serializerMap) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return serializerMap.get(type);
|
return serializerMap.get(type);
|
||||||
@ -103,7 +103,7 @@ public class GlobalSerializeMapping {
|
|||||||
* @return 自定义的反序列化器或者{@code null}
|
* @return 自定义的反序列化器或者{@code null}
|
||||||
*/
|
*/
|
||||||
public static JSONDeserializer<?> getDeserializer(Type type){
|
public static JSONDeserializer<?> getDeserializer(Type type){
|
||||||
if(null == deserializerMap) {
|
if(null == type || null == deserializerMap) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return deserializerMap.get(type);
|
return deserializerMap.get(type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user