aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2020-02-24 10:15:13 +0000
committeraribeiro <anderson.ribeiro@est.tech>2020-02-24 10:16:49 +0000
commit5c8a8db6fde8ae5d3994fe2360e6143e8b800153 (patch)
tree2ae55ce266cb243ea471e18c895e5267100102fa /catalog-model/src
parent8a1faa5cf388f3f93a5fa57d29335c9f53b2c677 (diff)
Fix Null Pointer Exception when loading resources from home page.
Issue-ID: SDC-2777 Change-Id: Ia25f34736a8926b6ebe622114b0beb1f806f4791 Signed-off-by: aribeiro <anderson.ribeiro@est.tech>
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
index c60330f191..3cea34fdef 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
@@ -39,13 +39,12 @@ import java.util.stream.Collectors;
import org.apache.commons.collections.MapUtils;
import org.openecomp.sdc.be.config.ConfigurationManager;
import org.openecomp.sdc.be.dao.utils.MapUtil;
+import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.GroupDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.PolicyDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.PolicyTargetType;
-import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
-import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.PropertiesOwner;
-
+import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.model.category.CategoryDefinition;
import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
@@ -53,8 +52,6 @@ import org.openecomp.sdc.be.model.jsonjanusgraph.datamodel.ToscaElementTypeEnum;
import org.openecomp.sdc.common.api.ArtifactTypeEnum;
import org.openecomp.sdc.common.log.api.ILogConfiguration;
-import static java.util.stream.Collectors.toMap;
-
public abstract class Component implements PropertiesOwner {
private ComponentMetadataDefinition componentMetadataDefinition;
@@ -818,6 +815,11 @@ public abstract class Component implements PropertiesOwner {
else if (!interfaces.equals(other.interfaces)) {
return false;
}
+ if (properties == null) {
+ if (other.properties != null) {
+ return false;
+ }
+ }
else if (!properties.equals(other.properties)) {
return false;
}