Skip to content

Commit e724ea1

Browse files
Tejas-Tejujzheaux
authored andcommitted
Update UsernameNotFoundException message
Closes gh-16497 Signed-off-by: tejas-teju <tejas8196@gmail.com>
1 parent 5af4b9a commit e724ea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/springframework/security/provisioning/InMemoryUserDetailsManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public UserDetails updatePassword(UserDetails user, String newPassword) {
164164
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
165165
UserDetails user = this.users.get(username.toLowerCase(Locale.ROOT));
166166
if (user == null) {
167-
throw new UsernameNotFoundException(username);
167+
throw new UsernameNotFoundException("user '" + username + "' not found");
168168
}
169169
if (user instanceof CredentialsContainer) {
170170
return user;

0 commit comments

Comments
 (0)