mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 13:34:18 +08:00
修复 StpUtil.getLoginId(T defaultValue) 传入 null 时无法正确返回值的bug
This commit is contained in:
parent
b4baa4229f
commit
535c8e972f
@ -995,8 +995,8 @@ public class StpLogic {
|
|||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
// 3、loginId 不为 null,则开始尝试类型转换
|
// 3、loginId 不为 null,则开始尝试类型转换
|
||||||
if (defaultValue == null) {
|
if(defaultValue == null) {
|
||||||
return null;
|
return (T) loginId;
|
||||||
}
|
}
|
||||||
return (T) SaFoxUtil.getValueByType(loginId, defaultValue.getClass());
|
return (T) SaFoxUtil.getValueByType(loginId, defaultValue.getClass());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user