Commit d188fafa authored by Michael Ritter's avatar Michael Ritter
Browse files

Update the hashcode/equals

parent 09a7ed9d
......@@ -148,23 +148,18 @@ public class Collection implements Serializable {
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
return id != null ? id.hashCode() : 0;
}
@Override
public boolean equals( Object object ) {
if ( !(object instanceof Collection) ) {
return false;
}
Collection other = (Collection) object;
if ( (this.id == null && other.id != null) || (this.id != null && !this.id.equals(
other.id)) ) {
return false;
}
return true;
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Collection that = (Collection) o;
// auto gen loves nots apparently
return !(id != null ? !id.equals(that.id) : that.id != null);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment