From fedaea3c645ac54a7fe68d2aece2259adb96d6d4 Mon Sep 17 00:00:00 2001 From: anushadasari Date: Wed, 6 Nov 2019 16:22:45 +0530 Subject: Merge this if statement with the enclosing one. Merging collapsible if statements increases the code's readability. Issue-ID: VID-699 Change-Id: Ia2b7408dd4ed73d57ead0fb4f2b404e74745b4ec Signed-off-by: anushadasari --- vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'vid-app-common') diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java index 1c8a465cb..45478e20f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java @@ -360,12 +360,10 @@ public class ServiceModel { " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName); // now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF - if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) { - if (isVolumeGroupsContainsVfModuleCustomName(vfModuleCustomizationName)) { + if ( vfModuleComponent.getValue().isVolumeGroupAllowed() && isVolumeGroupsContainsVfModuleCustomName(vfModuleCustomizationName) ) { (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName)); } } - } private boolean isVolumeGroupsContainsVfModuleCustomName(String vfModuleCustomizationName) { return (!MapUtils.isEmpty(getVolumeGroups())) && (getVolumeGroups().containsKey((vfModuleCustomizationName))); -- cgit 1.2.3-korg From aa283f736b1892426303582d141d3d12cb19b162 Mon Sep 17 00:00:00 2001 From: anushadasari Date: Wed, 6 Nov 2019 16:42:25 +0530 Subject: Merge this if statement with the enclosing one. Merging collapsible if statements increases the code's readability. Issue-ID: VID-699 Change-Id: I4be3daf6ee87a94fef5ec3687f999b0a67ae1f06 Signed-off-by: anushadasari --- .../webapp/app/vid/scripts/controller/InstantiationController.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'vid-app-common') diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js index 6d8dde844..9037b99f4 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js @@ -162,13 +162,10 @@ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) { if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) { vnfModel = svcModel.vnfs[vnfModelCustomizationUuid]; - if (vnfModel !== undefined) { - - if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) { + if (vnfModel !== undefined && !($scope.isObjectEmpty(vnfModel.volumeGroups))) { //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4)); return (vnfModel.volumeGroups); } - } } else { // old flow -- cgit 1.2.3-korg