Don’t implement equals() without hashCode()!
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 10 Apr 2011 09:13:12 +0000 (11:13 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 04:39:40 +0000 (06:39 +0200)
src/main/java/net/pterodactylus/sone/data/Album.java

index d808e7c..601e68d 100644 (file)
@@ -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;