lprimak commented on code in PR #2807:
URL: https://github.com/apache/shiro/pull/2807#discussion_r3454636644


##########
core/src/main/java/org/apache/shiro/mgt/DefaultSecurityManager.java:
##########
@@ -305,7 +305,7 @@ public Subject login(Subject subject, AuthenticationToken 
token) throws Authenti
      * @param subject Subject
      */
     protected void beforeSuccessfulLogin(Subject subject) {
-        Session session = subject.getSession(false);
+        Session session = subject != null ? subject.getSession(false) : null;

Review Comment:
   Ordinarily I would agree with you but pragmatically I think the null check 
is more readable in this case. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to