mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
Fix equals bug.
This commit is contained in:
parent
ca0b5bfcbe
commit
f8a6607de9
@ -83,14 +83,17 @@ public class Collaborator implements Serializable {
|
|||||||
|
|
||||||
Collaborator that = (Collaborator) o;
|
Collaborator that = (Collaborator) o;
|
||||||
|
|
||||||
if (id != that.id) return false;
|
if (id != that.getId()) return false;
|
||||||
if (email != null ? !email.equals(that.email) : that.email != null) return false;
|
if (email != null ? !email.equals(that.getEmail()) : that.getEmail() != null) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
long id = this.getId();
|
||||||
|
String email = this.getEmail();
|
||||||
|
|
||||||
int result = (int) (id ^ (id >>> 32));
|
int result = (int) (id ^ (id >>> 32));
|
||||||
result = 31 * result + (email != null ? email.hashCode() : 0);
|
result = 31 * result + (email != null ? email.hashCode() : 0);
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user