aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/jsongraph/JanusGraphDao.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementLifecycleOperation.java2
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java6
3 files changed, 4 insertions, 6 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 5917b14fd3..7a8d1b7ca7 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) {
+ if (result == null && org.apache.commons.collections4.IteratorUtils.isEmpty(prevEdgeIter)) {
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 771620d758..a0e6e7e12d 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) {
+ if (result == null && foundEdge!=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 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) {