From 7231a1d0090fc13df11cc52686a0dd3a7d271545 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 28 Jan 2013 22:46:03 +0100 Subject: [PATCH] Use getId() instead of accessing id directly for Identity objects. --- .../java/net/pterodactylus/sone/freenet/wot/DefaultIdentity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultIdentity.java b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultIdentity.java index 176a3be..0cfb055 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultIdentity.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/DefaultIdentity.java @@ -208,7 +208,7 @@ public class DefaultIdentity implements Identity { */ @Override public int hashCode() { - return id.hashCode(); + return getId().hashCode(); } /** @@ -216,11 +216,11 @@ public class DefaultIdentity implements Identity { */ @Override public boolean equals(Object object) { - if (!(object instanceof DefaultIdentity)) { + if (!(object instanceof Identity)) { return false; } - DefaultIdentity identity = (DefaultIdentity) object; - return identity.id.equals(id); + Identity identity = (Identity) object; + return identity.getId().equals(getId()); } /** -- 2.7.4