summaryrefslogtreecommitdiffstats
path: root/models-tosca/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-03 17:00:16 +0000
committerGerrit Code Review <gerrit@onap.org>2021-05-03 17:00:16 +0000
commitda708d64dc27f36ed5da733fca14ebfb4cc2832b (patch)
tree4af7d16af7c578a885fd9d6f48855299fcf6a5ad /models-tosca/src
parenteb830bfda2a18618032434aa7ebe3501bca2cca7 (diff)
parent4fdecb037bd2609a6b977adba6d2f263c977d9e1 (diff)
Merge "Remove GroupValidationResult"
Diffstat (limited to 'models-tosca/src')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java
index 5dda6ecfc..2fa2a557a 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/utils/ToscaUtils.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2021 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -229,8 +229,8 @@ public final class ToscaUtils {
}
if (entityType.getKey().equals(parentEntityTypeKey)) {
- result.addResult(new ObjectValidationResult("entity type", entityType.getKey().getId(),
- ValidationStatus.INVALID, "ancestor of itself"));
+ result.addResult("entity type", entityType.getKey().getId(),
+ ValidationStatus.INVALID, "ancestor of itself");
throw new PfModelRuntimeException(Response.Status.CONFLICT, result.getResult());
}
@@ -239,8 +239,7 @@ public final class ToscaUtils {
.getAll(parentEntityTypeKey.getName(), parentEntityTypeKey.getVersion());
Set<JpaToscaEntityType<ToscaEntity>> ancestorEntitySetToReturn = new HashSet<>(ancestorEntitySet);
if (ancestorEntitySet.isEmpty()) {
- result.addResult(new ObjectValidationResult("parent", parentEntityTypeKey.getId(), ValidationStatus.INVALID,
- Validated.NOT_FOUND));
+ result.addResult("parent", parentEntityTypeKey.getId(), ValidationStatus.INVALID, Validated.NOT_FOUND);
} else {
for (JpaToscaEntityType<?> filteredEntityType : ancestorEntitySet) {
ancestorEntitySetToReturn.addAll(getEntityTypeAncestors(entityTypes, filteredEntityType, result));