From 9b3f43937f088d3b022c7202c74369b320a7b856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Mon, 11 Nov 2024 16:25:48 +0100 Subject: [PATCH] RLH-21 - Fix Sonar --- .../java/wtf/beatrice/releasehive/services/UserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/wtf/beatrice/releasehive/services/UserServiceImpl.java b/src/main/java/wtf/beatrice/releasehive/services/UserServiceImpl.java index ae0a757..b6d7460 100644 --- a/src/main/java/wtf/beatrice/releasehive/services/UserServiceImpl.java +++ b/src/main/java/wtf/beatrice/releasehive/services/UserServiceImpl.java @@ -36,7 +36,7 @@ public class UserServiceImpl implements UserService @Override public boolean deleteUser(UUID id) { if (userRepository.findById(id).isEmpty()) { - throw new UsernameNotFoundException(id.toString()); + throw new UsernameNotFoundException("User not found"); } if (userRepository.findById(id).isPresent()) { userRepository.delete(userRepository.findById(id).get());