summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Closset <cc697w@intl.att.com>2017-05-02 09:10:28 +0000
committerGerrit Code Review <gerrit@onap.org>2017-05-02 09:10:28 +0000
commitf25267232637e4f0c1ca2bb75dfd71e6e05ab443 (patch)
treef38dbe8295dc64db2f6df95cfc85b9ddf1acb77a
parent4fef8a13c2f24d4f973e8fd628284133961ee703 (diff)
parent6a6fdac2d81cd38390c11cfbb81ec0168665cfea (diff)
Merge "Simplify MsoHeatEnvironmentParameter methods"
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java
index 4cf9023b7c..7444e1c881 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameter.java
@@ -20,7 +20,7 @@
package org.openecomp.mso.openstack.utils;
-
+import java.util.Objects;
public class MsoHeatEnvironmentParameter {
@@ -66,20 +66,11 @@ public class MsoHeatEnvironmentParameter {
}
MsoHeatEnvironmentParameter hep = (MsoHeatEnvironmentParameter) o;
// If the name of the parameter is the same, then they're equal
- if (hep.getName().equals(this.getName())) {
- return true;
- }
- return false;
+ return hep.getName().equals(this.getName());
}
public int hashCode() {
- int result = 0;
- try {
- result = this.name.hashCode();
- } catch (Exception e) {
- // in case it's null - return zero
- }
- return result;
+ return Objects.hashCode(this.name);
}