Skip to content

Commit

Permalink
Replace "!instanceof" by "is not an instance of"
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Aug 13, 2024
1 parent 2f37583 commit 10354dd
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse resp
UserDetails user = (UserDetails) principal;
ServiceManager.getSessionService().expireSessionsOfUser(user);
} else {
logger.warn(MessageFormat.format("Cannot expire session: {0} !instanceof UserDetails",
logger.warn(MessageFormat.format("Cannot expire session: {0} is not an instance of UserDetails",
Helper.getObjectDescription(principal)));
}
} else {
Original file line number Diff line number Diff line change
@@ -58,11 +58,11 @@ public void sessionDestroyed(HttpSessionEvent se) {
if (principal instanceof SecurityUserDetails) {
expireSessionsOfUser((SecurityUserDetails) principal);
} else {
logger.warn(MessageFormat.format("Cannot expire session: {0} !instanceof SecurityUserDetails",
logger.warn(MessageFormat.format("Cannot expire session: {0} is not an instance of SecurityUserDetails",
Helper.getObjectDescription(principal)));
}
} else {
logger.warn(MessageFormat.format("Cannot expire session: {0} !instanceof SecurityContextImpl",
logger.warn(MessageFormat.format("Cannot expire session: {0} is not an instance of SecurityContextImpl",
Helper.getObjectDescription(securityContextObject)));
}
}

0 comments on commit 10354dd

Please sign in to comment.