Skip to content

Commit

Permalink
Override hashcode so cache actually caches :)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurt committed Aug 9, 2018
1 parent b69858d commit 7dd5f83
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -32,6 +32,7 @@

import com.google.common.collect.Lists;
import com.google.common.util.concurrent.MoreExecutors;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.mindrot.jbcrypt.BCrypt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -609,5 +610,12 @@ public boolean equals(Object obj)

return this.username.equals(other.username);
}

@Override
public int hashCode() {
return new HashCodeBuilder(19, 29)
.append(username)
.toHashCode();
}
}
}

0 comments on commit 7dd5f83

Please sign in to comment.