Fix sonar issue EventJob 93/106193/1
authoredyta <edyta.krukowska@nokia.com>
Fri, 17 Apr 2020 13:02:08 +0000 (15:02 +0200)
committeredyta <edyta.krukowska@nokia.com>
Fri, 17 Apr 2020 13:02:08 +0000 (15:02 +0200)
Issue-ID: INT-1517
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: I973fe6d5854d50d93a6bf874d3066b6137a6012b

pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java

index c4b40fc..6e4411d 100644 (file)
@@ -69,24 +69,25 @@ public class EventJob implements Job {
             LOGGER.error("Could not send event as client is not available");
         }
     }
+
     private Optional<HttpClientAdapter> getHttpClientAdapter(JobDataMap jobDataMap, String vesUrl) {
         HttpClientAdapter adapter = null;
         try {
             adapter = (HttpClientAdapter) (jobDataMap.containsKey(CLIENT_ADAPTER) ? jobDataMap.get(CLIENT_ADAPTER) :
-                     new HttpClientAdapterImpl(vesUrl, new SSLAuthenticationHelper()));
+                    new HttpClientAdapterImpl(vesUrl, new SSLAuthenticationHelper()));
         } catch (MalformedURLException e) {
             LOGGER.error("Invalid format of vesServerUr: {}", vesUrl);
-        } catch (IOException | GeneralSecurityException e){
+        } catch (IOException | GeneralSecurityException e) {
             LOGGER.error("Invalid configuration of client certificate");
         }
         return Optional.ofNullable(adapter);
     }
 
     private void logEventDetails(String templateName, String vesUrl, String body, String jobKey) {
-        LOGGER.info(String.format("Job %s:Sending event to %s from template %s",
-                jobKey, vesUrl, templateName));
+        LOGGER.info("Job {}:Sending event to {} from template {}",
+                jobKey, vesUrl, templateName);
         if (LOGGER.isDebugEnabled()) {
-            LOGGER.debug(String.format("Job %s: Request body %s", jobKey, body));
+            LOGGER.debug("Job {}: Request body {}", jobKey, body);
         }
     }