From 0498eb5d496b88121e496188e99d910e252a385b Mon Sep 17 00:00:00 2001 From: Piotr Hic Date: Sun, 22 Dec 2024 10:11:37 +0100 Subject: [PATCH] v9 --- src/main/java/core/basesyntax/UserService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/core/basesyntax/UserService.java b/src/main/java/core/basesyntax/UserService.java index c7c274a5..e8349858 100644 --- a/src/main/java/core/basesyntax/UserService.java +++ b/src/main/java/core/basesyntax/UserService.java @@ -5,10 +5,10 @@ public void registerUser(User user) { PasswordValidator passwordValidator = new PasswordValidator(); try { passwordValidator.validate(user.getPassword(), user.getRepeatPassword()); + saveUser(user); } catch (Exception exception) { System.out.println("Your passwords are incorrect. Try again."); } - saveUser(user); } public void saveUser(User user) {