X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-tosca%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fmodels%2Ftosca%2Fsimple%2Fconcepts%2FJpaToscaEntrySchema.java;h=b432486ae982675a65829476d0c550ed30c584f0;hb=3f48197acf151c5f2b2b8b4e7bd366c2371619a0;hp=881d87c4b0bc340be35f871698408993fa631523;hpb=82699a970d5f06c6dc1391d8beb0efe76bf84089;p=policy%2Fmodels.git diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntrySchema.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntrySchema.java index 881d87c4b..b432486ae 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntrySchema.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaEntrySchema.java @@ -3,7 +3,7 @@ * ONAP Policy Model * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019-2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,6 @@ import org.onap.policy.models.base.PfValidationResult.ValidationResult; import org.onap.policy.models.tosca.authorative.concepts.ToscaConstraint; import org.onap.policy.models.tosca.authorative.concepts.ToscaEntrySchema; - /** * Class to represent the EntrySchema of list/map property in TOSCA definition. * @@ -72,7 +71,7 @@ public class JpaToscaEntrySchema private String description; @ElementCollection - private List constraints; + private List constraints = new ArrayList<>(); /** * The full constructor creates a {@link JpaToscaEntrySchema} object with mandatory fields. @@ -170,7 +169,6 @@ public class JpaToscaEntrySchema this.getClass(), ValidationResult.INVALID, "entry schema description may not be blank")); } - if (constraints != null) { for (JpaToscaConstraint constraint : constraints) { if (constraint == null) {