aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-12-02 09:58:42 +0000
committerMichael Morris <michael.morris@est.tech>2021-12-07 09:06:39 +0000
commite97081649ac9b8655d45fe7781800a5e717dea07 (patch)
treeed1d6ab42e8d4fec138f6bf30e2461e987ada7fc /catalog-be/src/main
parenta7dd2ece847fa88dda4912994f2e5220bd4adb7b (diff)
Fix Node Filter faults
Issue-ID: SDC-3798 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: If8f3cbed8bf63bc1667e279b48ac0c2488d6a350
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
index eddc8ffcee..01e07eb6cd 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/validation/NodeFilterValidator.java
@@ -145,10 +145,11 @@ public class NodeFilterValidator {
String source = SOURCE;
final Optional<ComponentInstance> optionalComponentInstance;
final List<PropertyDefinition> propertyDefinitions = parentComponent.getProperties();
+ final var SELF = "SELF";
List<? extends PropertyDefinition> sourcePropertyDefinition =
- parentComponent.getName().equals(uiConstraint.getSourceName()) && propertyDefinitions != null ? propertyDefinitions
+ SELF.equalsIgnoreCase(uiConstraint.getSourceName()) && propertyDefinitions != null ? propertyDefinitions
: Collections.emptyList();
- if (sourcePropertyDefinition.isEmpty() && !parentComponent.getName().equals(uiConstraint.getSourceName())) {
+ if (sourcePropertyDefinition.isEmpty() && !SELF.equalsIgnoreCase(uiConstraint.getSourceName())) {
optionalComponentInstance = parentComponent.getComponentInstances().stream()
.filter(componentInstance -> uiConstraint.getSourceName().equals(componentInstance.getName())).findFirst();
if (optionalComponentInstance.isPresent()) {