diff options
Diffstat (limited to 'models-pdp/src/main')
-rw-r--r-- | models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java index 49dfd6fbb..4cb0ac54e 100644 --- a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java +++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java @@ -89,6 +89,11 @@ public class PdpGroup implements PfNameVersion, Comparable<PdpGroup> { result.validateNotNull("name", name); result.validateNotNullList("pdpSubgroups", pdpSubgroups, PdpSubGroup::validatePapRest); + if (pdpSubgroups != null && pdpSubgroups.isEmpty()) { + result.addResult(new ObjectValidationResult("pdpSubgroups", pdpSubgroups, ValidationStatus.INVALID, + "is empty")); + } + checkDuplicateSubgroups(result); return result; |