Github user ceharris commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-client/pull/184#discussion_r133655326
  
    --- Diff: 
guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java
 ---
    @@ -232,11 +286,17 @@ private AuthenticatedUser 
getAuthenticatedUser(GuacamoleSession existingSession,
             try {
     
                 // Re-authenticate user if session exists
    -            if (existingSession != null)
    -                return 
updateAuthenticatedUser(existingSession.getAuthenticatedUser(), credentials);
    +            if (existingSession != null) {
    +                AuthenticatedUser updatedUser = updateAuthenticatedUser(
    +                        existingSession.getAuthenticatedUser(), 
credentials);
    +                notifyAuthenticationSuccessListeners(updatedUser, 
existingSession);
    +                return updatedUser;
    +            }
     
                 // Otherwise, attempt authentication as a new user
    -            AuthenticatedUser authenticatedUser = 
AuthenticationService.this.authenticateUser(credentials);
    +            AuthenticatedUser authenticatedUser = 
authenticateUser(credentials);
    --- End diff --
    
    I suspect that my IDE noticed that the explicit `this` wasn't needed and 
removed it. I haven't looked at the history of this piece of code, but I 
suspect that it was previously refactored from a state in which defererencing 
`authenticateUser` in this way was necessary. I'm happy to revert this change 
if desired.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to