diff options
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src')
2 files changed, 9 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java b/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java index c980a0c08..c9b37c269 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java +++ b/ms/controllerblueprints/modules/resource-dict/src/main/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/validator/ResourceAssignmentValidator.java @@ -29,15 +29,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import java.util.*;
+
/**
- *
* ResourceAssignmentValidator.java Purpose:
+ *
* @author Brinda Santh
*/
public class ResourceAssignmentValidator {
private static final Logger log = LoggerFactory.getLogger(ResourceAssignmentValidator.class);
private List<ResourceAssignment> assignments;
- private Map<String, ResourceAssignment> resourceAssignmentMap = new HashMap();
+ private Map<String, ResourceAssignment> resourceAssignmentMap = new HashMap<>();
private StrBuilder validationMessage = new StrBuilder();
public ResourceAssignmentValidator(List<ResourceAssignment> assignments) {
@@ -72,7 +73,7 @@ public class ResourceAssignmentValidator { * This is a validateResourceAssignment to validate the Topology Template
*
* @return boolean
- * @throws BluePrintException
+ * @throws BluePrintException BluePrintException
*/
public boolean validateResourceAssignment() throws BluePrintException {
if (assignments != null && !assignments.isEmpty()) {
@@ -142,16 +143,14 @@ public class ResourceAssignmentValidator { neighbors.forEach((v, vs) -> {
if (v == null) {
s.append("\n * -> [");
- List<ResourceAssignment> links = vs;
- for (ResourceAssignment resourceAssignment : links) {
+ for (ResourceAssignment resourceAssignment : vs) {
s.append("(" + resourceAssignment.getDictionaryName() + ":" + resourceAssignment.getName()
+ "),");
}
s.append("]");
} else {
s.append("\n (" + v.getDictionaryName() + ":" + v.getName() + ") -> [");
- List<ResourceAssignment> links = vs;
- for (ResourceAssignment resourceAssignment : links) {
+ for (ResourceAssignment resourceAssignment : vs) {
s.append("(" + resourceAssignment.getDictionaryName() + ":" + resourceAssignment.getName()
+ "),");
}
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt index 6809831f9..6a78ac852 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt @@ -16,15 +16,16 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict.service +import org.apache.commons.collections.CollectionUtils +import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.text.StrBuilder import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException import org.onap.ccsdk.apps.controllerblueprints.core.utils.TopologicalSortingUtils import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment import org.onap.ccsdk.apps.controllerblueprints.resource.dict.validator.ResourceAssignmentValidator import org.slf4j.LoggerFactory -import org.apache.commons.collections.CollectionUtils -import org.apache.commons.lang3.StringUtils import java.io.Serializable + /** * ResourceAssignmentValidationService. * |