diff options
author | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-10-04 10:51:15 +0000 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2019-10-04 11:34:49 +0000 |
commit | 003853d0d95c142e857b9e73f0164123e7e685ef (patch) | |
tree | 8b001aeac63a05ecc0860c43a63f128e8425ca40 | |
parent | e7dfc47fc893cc6aef80f795bd675f8443864550 (diff) |
Revert "Sonar fix NullPointerException"
This reverts commit b0f96a46e2720c75eb035bbe94015e5a1c6b0b32.
Issue-ID: SDC-2542
Change-Id: I63b5349670c8e5fa814d686cfa93173d0ea6297e
Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
3 files changed, 6 insertions, 4 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java index 7a8d1b7ca7..5917b14fd3 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java @@ -956,7 +956,7 @@ public class JanusGraphDao { toVertex.property(GraphPropertyEnum.UNIQUE_ID.getProperty())); result = JanusGraphOperationStatus.NOT_FOUND; } - if (result == null && org.apache.commons.collections4.IteratorUtils.isEmpty(prevEdgeIter)) { + if (result == null) { result = replaceEdgeLabel(fromVertex, toVertex, prevEdgeIter.next(), prevLabel, newLabel); } return result; diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java index a0e6e7e12d..771620d758 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java @@ -560,7 +560,7 @@ public class ToscaElementLifecycleOperation extends BaseOperation { result = StorageOperationStatus.NOT_FOUND; } } - if (result == null && foundEdge!=null) { + if (result == null) { JanusGraphOperationStatus createEdgeRes = janusGraphDao .createEdge(foundEdge.outVertex(), certifiedToscaElement.getVertex(), EdgeLabelEnum.LAST_STATE, foundEdge); 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 7d9d475943..3a48286280 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,14 +179,16 @@ public class ResourceMetadataDataDefinition extends ComponentMetadataDataDefinit } else if (!vendorName.equals(other.vendorName)) { return false; } - if (vendorRelease == null && other.vendorRelease != null) { + if (vendorRelease == null) { + if (other.vendorRelease != null) { return false; + } } if (toscaResourceName == null) { if (other.toscaResourceName != null) { return false; } - } else if (vendorRelease!=null && !vendorRelease.equals(other.vendorRelease)) { + } else if (!vendorRelease.equals(other.vendorRelease)) { return false; } if (resourceVendorModelNumber == null) { |