aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/User.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-04 22:35:19 +0300
committerGravatar Vitaly Takmazov2018-05-04 22:35:19 +0300
commitf386d47c66dd8cf69bb03972ed44d812b8f24761 (patch)
treeabf27f2874e032f4e682bd710bf097f5fc673fe8 /juick-common/src/main/java/com/juick/User.java
parentff75e92712d55bfb8debbb796f3bc7985dfac569 (diff)
common: add missing hashCode() to core entities
Diffstat (limited to 'juick-common/src/main/java/com/juick/User.java')
-rw-r--r--juick-common/src/main/java/com/juick/User.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/juick-common/src/main/java/com/juick/User.java b/juick-common/src/main/java/com/juick/User.java
index 478c6a48..5edfe782 100644
--- a/juick-common/src/main/java/com/juick/User.java
+++ b/juick-common/src/main/java/com/juick/User.java
@@ -18,7 +18,6 @@ package com.juick;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import javax.annotation.Nonnull;
@@ -29,13 +28,14 @@ import javax.xml.bind.annotation.XmlTransient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
/**
* @author Ugnich Anton
*/
@XmlRootElement(name = "user", namespace = "http://juick.com/user")
@XmlAccessorType()
-public class User implements Serializable {
+public class User {
private int uid;
private String name;
private Object avatar;
@@ -59,9 +59,7 @@ public class User implements Serializable {
@Override
public int hashCode() {
- return new HashCodeBuilder()
- .append(getUid())
- .toHashCode();
+ return Objects.hash(uid);
}
@Override