Skip to content

Commit

Permalink
refactor code style10
Browse files Browse the repository at this point in the history
  • Loading branch information
VasylAzarov committed Nov 2, 2024
1 parent 91483ac commit 2ca7738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/PasswordValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class PasswordValidator {
public void validate(String password, String repeatPassword)
throws PasswordValidationException {
if (!Objects.equals(password, repeatPassword) || password.toCharArray().length < 10) {
if (password != null && repeatPassword != null || !Objects.equals(password, repeatPassword) || password.toCharArray().length < 10) {
throw new PasswordValidationException("Wrong passwords");
}
}
Expand Down

0 comments on commit 2ca7738

Please sign in to comment.