Merge "Exception issue"
diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
index ea57409..0c2ce2f 100644
--- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
+++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
@@ -189,11 +189,7 @@
 
         }
 
-        if (data.isPresent()) {
-            return true;
-        } else {
-            return false;
-        }
+        return data.isPresent();
     }
 
     protected void addArtifactVersion(String aName, String aVersion) {
@@ -289,14 +285,14 @@
 
 @Override
 public Future<RpcResult<VfLicenseModelUpdateOutput>> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) {
-    final String SVC_OPERATION = "vf-license-model-update";
+    final String svcOperation = "vf-license-model-update";
 
     Properties parms = new Properties();
 
-    LOG.info( SVC_OPERATION +" called." );
+    LOG.info( svcOperation +" called." );
 
     if(input == null ) {
-        LOG.debug("exiting " +SVC_OPERATION+ " because of invalid input");
+        LOG.debug("exiting " +svcOperation+ " because of invalid input");
         return null;
     }
 
@@ -313,7 +309,7 @@
         errorMessage = "Artifact version already exists";
     } else {
         // Translate input object into SLI-consumable properties
-        LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + inputVfLic);
+        LOG.info("Adding INPUT data for "+svcOperation+" input: " + inputVfLic);
         AsdcApiUtil.toProperties(parms, inputVfLic);
 
 
@@ -321,19 +317,19 @@
         Properties respProps = null;
         try
         {
-            if (asdcApiSliClient.hasGraph("ASDC-API", SVC_OPERATION , null, "sync"))
+            if (asdcApiSliClient.hasGraph("ASDC-API", svcOperation , null, "sync"))
             {
 
                 try
                 {
-                    respProps = asdcApiSliClient.execute("ASDC-API", SVC_OPERATION, null, "sync", parms);
+                    respProps = asdcApiSliClient.execute("ASDC-API", svcOperation, null, "sync", parms);
                 }
                 catch (Exception e)
                 {
-                    LOG.error("Caught exception executing service logic for "+ SVC_OPERATION, e);
+                    LOG.error("Caught exception executing service logic for "+ svcOperation, e);
                 }
             } else {
-                errorMessage = "No service logic active for ASDC-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for ASDC-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
         }
diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
index 91482d8..40ebde6 100644
--- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
+++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
@@ -100,15 +100,15 @@
 	@Override
 	public Future<RpcResult<DataChangeNotificationOutput>> dataChangeNotification(
 			DataChangeNotificationInput input) {
-		final String SVC_OPERATION = "data-change-notification";
+		final String svcOperation = "data-change-notification";
 
 		Properties parms = new Properties();
 		DataChangeNotificationOutputBuilder serviceDataBuilder = new DataChangeNotificationOutputBuilder();
 
-		LOG.info( SVC_OPERATION +" called." );
+		LOG.info( svcOperation +" called." );
 
 		if(input == null || input.getAaiEventId() == null) {
-			LOG.debug("exiting " +SVC_OPERATION+ " because of invalid input");
+			LOG.debug("exiting " +svcOperation+ " because of invalid input");
 			serviceDataBuilder.setDataChangeResponseCode("403");
 			RpcResult<DataChangeNotificationOutput> rpcResult =
 				RpcResultBuilder.<DataChangeNotificationOutput> status(true).withResult(serviceDataBuilder.build()).build();
@@ -116,26 +116,26 @@
 		}
 
 		// add input to parms
-		LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input);
+		LOG.info("Adding INPUT data for "+svcOperation+" input: " + input);
 		DataChangeNotificationInputBuilder inputBuilder = new DataChangeNotificationInputBuilder(input);
 		MdsalHelper.toProperties(parms, inputBuilder.build());
 
 		// Call SLI sync method
 		try
 		{
-			if (dataChangeClient.hasGraph("DataChange", SVC_OPERATION , null, "sync"))
+			if (dataChangeClient.hasGraph("DataChange", svcOperation , null, "sync"))
 			{
 				try
 				{
-					dataChangeClient.execute("DataChange", SVC_OPERATION, null, "sync", serviceDataBuilder, parms);
+					dataChangeClient.execute("DataChange", svcOperation, null, "sync", serviceDataBuilder, parms);
 				}
 				catch (Exception e)
 				{
-					LOG.error("Caught exception executing service logic for "+ SVC_OPERATION, e);
+					LOG.error("Caught exception executing service logic for "+ svcOperation, e);
 					serviceDataBuilder.setDataChangeResponseCode("500");
 				}
 			} else {
-				LOG.error("No service logic active for DataChange: '" + SVC_OPERATION + "'");
+				LOG.error("No service logic active for DataChange: '" + svcOperation + "'");
 				serviceDataBuilder.setDataChangeResponseCode("503");
 			}
 		}
@@ -148,9 +148,9 @@
 		String errorCode = serviceDataBuilder.getDataChangeResponseCode();
 
 		if (!("0".equals(errorCode) || "200".equals(errorCode))) {
-			LOG.error("Returned FAILED for "+SVC_OPERATION+" error code: '" + errorCode + "'");
+			LOG.error("Returned FAILED for "+svcOperation+" error code: '" + errorCode + "'");
 		} else {
-			LOG.info("Returned SUCCESS for "+SVC_OPERATION+" ");
+			LOG.info("Returned SUCCESS for "+svcOperation+" ");
 		}
 
 		RpcResult<DataChangeNotificationOutput> rpcResult =
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
index b26c50f..6521559 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
@@ -43,8 +43,6 @@
 		addParameter("type", extractValue (nodeTemplate, "nf_type"));
 		addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, "nf_naming#ecomp_generated_naming"));
 		addParameter("naming_policy", extractValue (nodeTemplate, "nf_naming#naming_policy"));
-		//addParameter("depending_service", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_DEPENDINGSERVICE));
-		//addParameter("service_dependency", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_SERVICEDEPENDENCY));
 	}
 
 }
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
index 35e62f8..5041b4d 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
@@ -573,11 +573,10 @@
 			insertToscaData(serviceModel.getSql(model_yaml));
 		} catch (IOException e) {
 			LOG.error("Could not insert Tosca YAML data into the SERVICE_MODEL table ", e);
-			// return;
+    
 		}
 
 		// Ingest Network (VL) Data - 1707
-		//List<NodeTemplate> vlNodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VL");
 		List<NodeTemplate> vlNodeTemplatesList = sdcCsarHelper.getServiceVlList();
 
 		for (NodeTemplate nodeTemplate :  vlNodeTemplatesList) {
@@ -614,7 +613,6 @@
 		}
 
 		// Ingest Network (VF) Data - 1707
-		//List<NodeTemplate> nodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VF");
 		List<NodeTemplate> vfNodeTemplatesList = sdcCsarHelper.getServiceVfList();
 
 		for (NodeTemplate nodeTemplate :  vfNodeTemplatesList) {
@@ -642,7 +640,6 @@
 				}
 
 				// For each VF Module, get the VFC list, insert VF_MODULE_TO_VFC_MAPPING data
-				// List<NodeTemplate> groupMembers = sdcCsarHelper.getMembersOfGroup(group); - old version
 				// For each vfcNode (group member) in the groupMembers list, extract vm_type and vm_count.
 				// Insert vf_module.customizationUUID, vfcNode.customizationUUID and vm_type and vm_count into VF_MODULE_TO_VFC_MAPPING
 				List<NodeTemplate> groupMembers = sdcCsarHelper.getMembersOfVfModule(nodeTemplate, group); // not yet available
@@ -707,12 +704,11 @@
 
 					// extract values from the left "CP" Node
 					SdncBaseModel.addParameter("ipv4_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams);
-					//SdncBaseModel.addParameter("ipv4_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams);
+
 					SdncBaseModel.addParameter("ipv4_ip_version", "dummy_ipv4_vers", mappingParams);
 					SdncBaseModel.addParameter("ipv6_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams);
-					//SdncBaseModel.addParameter("ipv6_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams);
+
 					SdncBaseModel.addParameter("ipv6_ip_version", "dummy_ipv6_vers", mappingParams);
-					//String extcp_subnetpool_id = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_SUBNETPOOLID) + "\""; // need path to subnetpoolid
 
 					// extract values from the right "VFC" Node
 					String vfcCustomizationUuid = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getRight().getMetaData(), "customization_uuid") + "\"";
@@ -817,7 +813,7 @@
 
         if (artifactType != ArtifactTypeEnum.YANG_XML) {
             LOG.error("Unexpected artifact type - expecting YANG_XML, got "+artifactType);
-			return (null);
+			return null;
         }
 
         // Examine outer tag
@@ -1024,7 +1020,7 @@
         conn.setDoOutput(true);
         conn.setUseCaches(false);
 
-		return(conn);
+		return conn;
 
     }
 
@@ -1045,7 +1041,7 @@
 			LOG.error("Caught exception posting to ODL tier", e);
         }
 
-		return(response);
+		return response;
 
     }
 
@@ -1089,7 +1085,7 @@
         // After transformations, parse transformed XML
 
 
-		return(outFile);
+		return outFile;
     }
 
     private String escapeFilename(String str) {
@@ -1106,7 +1102,7 @@
             }
         }
 
-		return(retval.toString());
+		return retval.toString();
 
     }