diff --git a/src/net/java/sip/communicator/service/protocol/ContactResource.java b/src/net/java/sip/communicator/service/protocol/ContactResource.java index 3a766b6e4..096991770 100644 --- a/src/net/java/sip/communicator/service/protocol/ContactResource.java +++ b/src/net/java/sip/communicator/service/protocol/ContactResource.java @@ -125,4 +125,35 @@ public boolean isMobile() { return mobile; } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = + prime * result + + ((resourceName == null) ? 0 : resourceName.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ContactResource other = (ContactResource) obj; + if (resourceName == null) + { + if (other.resourceName != null) + return false; + } + else if (!resourceName.equals(other.resourceName)) + return false; + return true; + } }