From: David ‘Bombe’ Roden Date: Sun, 10 Apr 2011 09:13:12 +0000 (+0200) Subject: Don’t implement equals() without hashCode()! X-Git-Tag: beta-freefall-0.6.2-1~67 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=388d63c29c33bc5e570a0d29328338e13e8094e5;p=Sone.git Don’t implement equals() without hashCode()! --- diff --git a/src/main/java/net/pterodactylus/sone/data/Album.java b/src/main/java/net/pterodactylus/sone/data/Album.java index d808e7c..601e68d 100644 --- a/src/main/java/net/pterodactylus/sone/data/Album.java +++ b/src/main/java/net/pterodactylus/sone/data/Album.java @@ -304,6 +304,14 @@ public class Album implements Fingerprintable { * {@inheritDoc} */ @Override + public int hashCode() { + return id.hashCode(); + } + + /** + * {@inheritDoc} + */ + @Override public boolean equals(Object object) { if (!(object instanceof Album)) { return false;