diff --git a/core/src/main/java/org/acegisecurity/providers/dao/AbstractUserDetailsAuthenticationProvider.java b/core/src/main/java/org/acegisecurity/providers/dao/AbstractUserDetailsAuthenticationProvider.java
index 4d91c536ce..e7e2869120 100644
--- a/core/src/main/java/org/acegisecurity/providers/dao/AbstractUserDetailsAuthenticationProvider.java
+++ b/core/src/main/java/org/acegisecurity/providers/dao/AbstractUserDetailsAuthenticationProvider.java
@@ -59,7 +59,7 @@ import org.springframework.util.Assert;
* true.
*
+ *
* Caching is handled via the UserDetails object being placed in
* the {@link UserCache}. This ensures that subsequent requests with the same
* username can be validated without needing to query the {@link
@@ -67,6 +67,9 @@ import org.springframework.util.Assert;
* incorrect password, the {@link UserDetailsService} will be queried to
* confirm the most up-to-date password was used for comparison.
*
+ *
* Protected so subclasses can override. *
* - *+ *
* Subclasses will usually store the original credentials the user supplied
* (not salted or encoded passwords) in the returned
* Authentication object.
@@ -213,8 +216,8 @@ public abstract class AbstractUserDetailsAuthenticationProvider
* @param principal that should be the principal in the returned object
* (defined by the {@link #isForcePrincipalAsString()} method)
* @param authentication that was presented to the
- * DaoAuthenticationProvider for validation
- * @param user that was loaded by the AuthenticationDao
+ * provider for validation
+ * @param user that was loaded by the implementation
*
* @return the successful authentication token
*/
@@ -226,8 +229,7 @@ public abstract class AbstractUserDetailsAuthenticationProvider
// authentication events after cache expiry contain the details
UsernamePasswordAuthenticationToken result = new UsernamePasswordAuthenticationToken(principal,
authentication.getCredentials(), user.getAuthorities());
- result.setDetails((authentication.getDetails() != null)
- ? authentication.getDetails() : null);
+ result.setDetails(authentication.getDetails());
return result;
}
@@ -287,7 +289,7 @@ public abstract class AbstractUserDetailsAuthenticationProvider
* @throws AuthenticationException if the credentials could not be
* validated (generally a BadCredentialsException, an
* AuthenticationServiceException or
- * UserNotFoundException)
+ * UsernameNotFoundException)
*/
protected abstract UserDetails retrieveUser(String username,
UsernamePasswordAuthenticationToken authentication)