From: David ‘Bombe’ Roden Date: Mon, 28 Jan 2013 21:46:03 +0000 (+0100) Subject: Use getId() instead of accessing id directly for Identity objects. X-Git-Tag: 0.8.5^2~3^2~35 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7231a1d0090fc13df11cc52686a0dd3a7d271545;p=Sone.git Use getId() instead of accessing id directly for Identity objects. --- 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()); } /**