From 396cb378ab8940b1adb8ba1adc656d0b4ad66f99 Mon Sep 17 00:00:00 2001 From: Divesh Mirchandani Date: Thu, 14 Sep 2017 19:14:21 +0530 Subject: Fixed SONAR issues Fixed blocker, critical, major & minor SONAR issues. Issue-ID: SDC-343 Change-Id: I72e5a3a7fa7d7407a92f98f77e4334827f70f926 Signed-off-by: dd4616 --- .../org/openecomp/sdc/action/ActionConstants.java | 2 +- .../org/openecomp/sdc/action/types/Action.java | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'openecomp-be/lib/openecomp-sdc-action-lib') diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java index fd6c76c92c..25cd06d3ce 100644 --- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java +++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java @@ -24,7 +24,7 @@ package org.openecomp.sdc.action; public class ActionConstants { // - public static final long MAX_ACTION_ARTIFACT_SIZE = 20 * 1024 * 1024; //20 MB + public static final long MAX_ACTION_ARTIFACT_SIZE = 20 * 1024 * 1024L; //20 MB //REST layer constants public static final String X_OPEN_ECOMP_INSTANCE_ID_HEADER_PARAM = "X-OPEN-ECOMP-InstanceID"; public static final String X_OPEN_ECOMP_REQUEST_ID_HEADER_PARAM = "X-OPEN-ECOMP-RequestID"; diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java index b7672644d2..cde97bc151 100644 --- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java +++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/types/Action.java @@ -244,4 +244,31 @@ public class Action implements Comparable { return Integer.compare(objVersion.getMajor(), thisVersion.getMajor()); } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + Action action = (Action) o; + + if (!version.equals(action.version)) { + return false; + } + if (!name.equals(action.name)) { + return false; + } + + return true; + } + + @Override + public int hashCode() { + int result = version.hashCode(); + result = 31 * result + name.hashCode(); + return result; + } } -- cgit 1.2.3-korg