优化代码 将空‘catch’块形参重命名为‘ignored’
Signed-off-by: 梁剑锋 <1822213252@qq.com>
This commit is contained in:
parent
223ae7ae72
commit
1ae35032a5
@ -83,7 +83,7 @@ public class SysUserOnlineController extends BaseController {
|
|||||||
public R<Void> forceLogout(@PathVariable String tokenId) {
|
public R<Void> forceLogout(@PathVariable String tokenId) {
|
||||||
try {
|
try {
|
||||||
StpUtil.kickoutByTokenValue(tokenId);
|
StpUtil.kickoutByTokenValue(tokenId);
|
||||||
} catch (NotLoginException e) {
|
} catch (NotLoginException ignored) {
|
||||||
}
|
}
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ public class SysLoginService {
|
|||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
StpUtil.logout();
|
StpUtil.logout();
|
||||||
asyncService.recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"), ServletUtils.getRequest());
|
asyncService.recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"), ServletUtils.getRequest());
|
||||||
} catch (NotLoginException e) {
|
} catch (NotLoginException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user