mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 13:32:30 +00:00
Changed to not detect null returns, as the UserMap will now throw the UsernameNotFoundException.
This commit is contained in:
parent
f203979237
commit
d59a5da321
@ -54,12 +54,6 @@ public class InMemoryDaoImpl implements AuthenticationDao, InitializingBean {
|
|||||||
|
|
||||||
public User loadUserByUsername(String username)
|
public User loadUserByUsername(String username)
|
||||||
throws UsernameNotFoundException, DataAccessException {
|
throws UsernameNotFoundException, DataAccessException {
|
||||||
User result = userMap.getUser(username);
|
return userMap.getUser(username);
|
||||||
|
|
||||||
if (result == null) {
|
|
||||||
throw new UsernameNotFoundException("User could not be found");
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user