From 3febaf7f2deaf775a8ec4fb34dd43c5c7927f653 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Apr 2011 12:35:17 +0200 Subject: [PATCH] Override hashCode() and equals() with calls to superclasses. This has been noticed by FindBugs. --- .../sone/freenet/wot/DefaultOwnIdentity.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java index ab96756..eade03e 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultOwnIdentity.java @@ -167,4 +167,20 @@ public class DefaultOwnIdentity extends DefaultIdentity implements OwnIdentity { } } + // + // OBJECT METHODS + // + + @Override + public int hashCode() { + /* The hash of DefaultIdentity is fine. */ + return super.hashCode(); + } + + @Override + public boolean equals(Object object) { + /* The ID of the superclass is still enough. */ + return super.equals(object); + } + } -- 2.7.4