Skip to content

Commit f195bfb

Browse files
committed
Update UsernameNotFoundException message
Closes gh-16497 Signed-off-by: tejas-teju <[email protected]>
1 parent cb16f48 commit f195bfb

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)