summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-11-29 15:41:41 +0900
committerParshad Patel <pars.patel@samsung.com>2018-11-29 17:53:07 +0900
commitb133ef89d21313447c20add7c4bb229981612a68 (patch)
tree312d92144a8482a9cedbffd557cd56131b67b44a
parent677b05aeacfd280209a07debba202eaa01ac0968 (diff)
Fix blocker sonar issues
Fix This class overrides "equals()" and should therefore also override "hashCode()" issues Issue-ID: PORTAL-342 Change-Id: Iabc3d51abbe6af595252791f38e9a639e850d2c4 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
-rw-r--r--ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java5
-rw-r--r--ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java
index 24e8731a..cac2fffa 100644
--- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java
+++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompUser.java
@@ -37,6 +37,7 @@
*/
package org.onap.portalsdk.core.restful.domain;
+import java.util.Objects;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -222,4 +223,8 @@ public class EcompUser implements Comparable<EcompUser> {
return this.loginId.equals(castOther.getLoginId());
}
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(getLoginId());
+ }
}
diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java
index 4ba41d6c..3d1b5ed5 100644
--- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java
+++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/PortalTimeoutVO.java
@@ -37,6 +37,8 @@
*/
package org.onap.portalsdk.core.restful.domain;
+import java.util.Objects;
+
public class PortalTimeoutVO implements Comparable<PortalTimeoutVO> {
private String jSessionId;
@@ -84,4 +86,8 @@ public class PortalTimeoutVO implements Comparable<PortalTimeoutVO> {
return this.getSessionTimOutMilliSec() == castOther.getSessionTimOutMilliSec();
}
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(getSessionTimOutMilliSec());
+ }
}