Fixing typo in parameter names
[clamp.git] / src / main / java / org / onap / clamp / clds / client / SdcCatalogServices.java
index e3d10c7..56f2961 100644 (file)
@@ -111,7 +111,7 @@ public class SdcCatalogServices {
 \r
             String resp = getResponse(conn);\r
             if (resp != null) {\r
-                logger.info(resp.toString());\r
+                logger.info(resp);
                 // metrics log\r
                 LoggingUtils.setResponseContext("0", "Get sdc services success", this.getClass().getName());\r
                 return resp;\r
@@ -321,15 +321,15 @@ public class SdcCatalogServices {
      * @param formattedSdcReq\r
      * @return\r
      */\r
-    public String uploadArtifactToSdc(ModelProperties prop, String userid, String url, String formatttedSdcReq) {\r
+    public String uploadArtifactToSdc(ModelProperties prop, String userid, String url, String formattedSdcReq) {
         // Verify whether it is triggered by Validation Test button from UI\r
         if (prop.isTest()) {\r
             return "sdc artifact upload not executed for test action";\r
         }\r
         try {\r
             logger.info("userid=" + userid);\r
-            String md5Text = SdcReq.calculateMD5ByString(formatttedSdcReq);\r
-            byte[] postData = SdcReq.stringToByteArray(formatttedSdcReq);\r
+            String md5Text = SdcReq.calculateMD5ByString(formattedSdcReq);\r
+            byte[] postData = SdcReq.stringToByteArray(formattedSdcReq);\r
             int postDataLength = postData.length;\r
             HttpURLConnection conn = getSdcHttpUrlConnection(userid, postDataLength, url, md5Text);\r
             try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) {\r
@@ -682,8 +682,7 @@ public class SdcCatalogServices {
                     artifactName = artifactNameNode.textValue();\r
                     artifactName = artifactName.substring(artifactName.lastIndexOf('.') + 1);\r
                 }\r
-                if (artifactUrlNode != null && artifactName != null && !artifactName.isEmpty()\r
-                        && artifactName.equalsIgnoreCase("csv")) {\r
+                if (artifactUrlNode != null && "csv".equalsIgnoreCase(artifactName)) {
                     String responsesFromArtifactUrl = getResponsesFromArtifactUrl(artifactUrlNode.textValue());\r
                     cldsVfKPIDataList.addAll(parseCsvToGetFieldPath(responsesFromArtifactUrl));\r
                     logger.info(responsesFromArtifactUrl);\r
@@ -1053,7 +1052,7 @@ public class SdcCatalogServices {
                         for (CldsAlarmCondition currCldsAlarmCondition : currCldsVfcData.getCldsAlarmConditions()) {\r
                             alarmCondNode.put(currCldsAlarmCondition.getAlarmConditionKey(),\r
                                     currCldsAlarmCondition.getAlarmConditionKey());\r
-                            if (currCldsAlarmCondition.getEventName().equalsIgnoreCase("alarmCondition")) {\r
+                            if ("alarmCondition".equalsIgnoreCase(currCldsAlarmCondition.getEventName())) {
                                 alarmCondNode.put(currCldsAlarmCondition.getAlarmConditionKey(),\r
                                         currCldsAlarmCondition.getAlarmConditionKey());\r
                             } else {\r