diff options
author | rama-huawei <rama.subba.reddy.s@huawei.com> | 2017-09-27 16:07:52 +0530 |
---|---|---|
committer | rama-huawei <rama.subba.reddy.s@huawei.com> | 2017-09-27 18:04:35 +0530 |
commit | dafa2caa3c0b16377be231d076708973025eb4c7 (patch) | |
tree | 51474990f7ff6491e79a0b702d0d2e12b09142ad /mso-catalog-db/src/main | |
parent | d019aee0e3fc220478956d2a6b9a20a2e98082db (diff) |
Removed useless assignment to variables
Issue-Id:SO-118
Change-Id: I97cfd892ae5d13003b0b37509ac91be863dbd55e
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'mso-catalog-db/src/main')
6 files changed, 8 insertions, 8 deletions
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java index 96aa2c22bc..2c79d7d48c 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java @@ -73,7 +73,7 @@ public class HeatTemplateArtifactUuidModelUuid implements Serializable { public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();
return result;
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java index 68b881e652..7ceb19c5a0 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateParam.java @@ -89,7 +89,7 @@ public class HeatTemplateParam implements Serializable { @Override public int hashCode () { - int result = 0; + int result; result = this.paramName == null ? 0 : this.paramName.hashCode() + this.heatTemplateArtifactUuid == null ? 0 : this.heatTemplateArtifactUuid.hashCode(); return result; } diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java index f119259fd0..9ef1fb6fd3 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java @@ -45,7 +45,7 @@ public class NetworkRecipe extends Recipe implements Serializable { @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(super.toString()); sb.append (",modelName=" + modelName); sb.append (",networkParamXSD=" + networkParamXSD); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java index a3c8468cb1..b6151f176d 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResource.java @@ -142,7 +142,7 @@ public class NetworkResource extends MavenLikeVersioning implements Serializable @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("NETWORK Resource:"); sb.append("modelVersion="); sb.append(modelVersion); diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java index 19660f3fbb..ef09fef41f 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java @@ -104,7 +104,7 @@ public class NetworkResourceCustomization implements Serializable{ @Override public String toString () { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("modelCustomizationUuid="); sb.append(this.modelCustomizationUuid); sb.append("networkResourceModelUuid="); @@ -143,9 +143,9 @@ public class NetworkResourceCustomization implements Serializable{ public int hashCode () { // hash code does not have to be a unique result - only that two objects that should be treated as equal // return the same value. so this should work. - int result = 0; + int result; result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.networkResourceModelUuid != null ? this.networkResourceModelUuid.hashCode() : 0); return result; } -}
\ No newline at end of file +} diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java index 3aad334a18..20801c105e 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java @@ -91,7 +91,7 @@ public class TempNetworkHeatTemplateLookup implements Serializable { public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result = 0;
+ int result;
result = (this.networkResourceModelName != null ? this.networkResourceModelName.hashCode() : 0) + (this.heatTemplateArtifactUuid != null ? this.heatTemplateArtifactUuid.hashCode() : 0);
return result;
}
|