From 34c0439254b1822d77d3c520cb98b1ececded13a Mon Sep 17 00:00:00 2001 From: Parshad Patel Date: Tue, 6 Nov 2018 15:03:57 +0900 Subject: Fix sonar issue in epsdk-core Fix this class overrides "equals()" and should therefore also override "hashCode()" sonar issue in TimeoutVO.java Issue-ID: PORTAL-342 Change-Id: I1422069ffb610491b7313a8056478e0dc3054c7a Signed-off-by: Parshad Patel --- .../java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ecomp-sdk') diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java index 777f502f..9d7621d6 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/domain/sessionmgt/TimeoutVO.java @@ -37,6 +37,8 @@ */ package org.onap.portalsdk.core.domain.sessionmgt; +import org.apache.wicket.util.lang.Objects; + public class TimeoutVO implements Comparable { private String jSessionId; @@ -80,6 +82,11 @@ public class TimeoutVO implements Comparable { return this.getSessionTimOutMilliSec() == castOther.getSessionTimOutMilliSec(); } + @Override + public int hashCode() { + return Objects.hashCode(getSessionTimOutMilliSec()); + } + @Override public int compareTo(TimeoutVO o) { return sessionTimOutMilliSec.compareTo(o.sessionTimOutMilliSec); -- cgit 1.2.3-korg