51.2 Code clean up - fix (#4)

This commit is contained in:
Art
2021-09-07 15:48:37 +03:00
parent 02de28d4e5
commit ca24902de6

View File

@ -134,10 +134,10 @@ public class UserServiceImpl implements UserService {
}
private void throwEmailExistsException(String email) {
throw new EmailExistsException("User with email `" + email + "` is already registered");
throw new EmailExistsException(String.format(EMAIL_EXISTS_MSG, email));
}
private void throwUsernameExistsException(String username) {
throw new UsernameExistsException("Username `" + username + "` is already taken. Please select another one");
throw new UsernameExistsException(String.format(USERNAME_EXISTS_MSG, username));
}
}