summaryrefslogtreecommitdiffstats
path: root/common-be/src
diff options
context:
space:
mode:
authorArindam Mondal <arind.mondal@samsung.com>2019-09-10 15:02:53 +0900
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-10-03 13:57:18 +0000
commitb0f96a46e2720c75eb035bbe94015e5a1c6b0b32 (patch)
tree5505f6910d94281a4d858c320f2013bfbddc715b /common-be/src
parent0c2d872da4b39f3427e761e57c86c089882c6171 (diff)
Sonar fix NullPointerException
Issue-ID: SDC-2542 Change-Id: I08a93932d2776c40a982bb802aeac994c1f35841 Signed-off-by: arindamm <arind.mondal@samsung.com>
Diffstat (limited to 'common-be/src')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java
index 3a48286280..7d9d475943 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java
@@ -179,16 +179,14 @@ public class ResourceMetadataDataDefinition extends ComponentMetadataDataDefinit
} else if (!vendorName.equals(other.vendorName)) {
return false;
}
- if (vendorRelease == null) {
- if (other.vendorRelease != null) {
+ if (vendorRelease == null && other.vendorRelease != null) {
return false;
- }
}
if (toscaResourceName == null) {
if (other.toscaResourceName != null) {
return false;
}
- } else if (!vendorRelease.equals(other.vendorRelease)) {
+ } else if (vendorRelease!=null && !vendorRelease.equals(other.vendorRelease)) {
return false;
}
if (resourceVendorModelNumber == null) {