Skip to content

Commit

Permalink
Fix equals and hashCode methods inside UsernamePasswordCredential…
Browse files Browse the repository at this point in the history
…s class to embrace the previous changes
  • Loading branch information
besidev committed Jan 4, 2024
1 parent 69c47f1 commit 015c928
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UsernamePasswordCredentials that = (UsernamePasswordCredentials) o;
return Objects.equals(username, that.username) && Objects.equals(password, that.password);
return Objects.equals(getUsername(), that.getUsername()) && Objects.equals(getPassword(), that.getPassword());
}

@Override
public int hashCode() {
return Objects.hash(username, password);
return Objects.hash(getUsername(), getPassword());
}

@Override
Expand Down

0 comments on commit 015c928

Please sign in to comment.