aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2020-04-20 06:36:46 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-20 06:36:46 +0000
commiteebb00794f4a0746a3833f8796ac11da7837e783 (patch)
tree861bbf907cf2162cf050b50e976a9f191e4c4497
parent16cac762b02aa497aa8b4c876c2e2b984d659e77 (diff)
parent4f31da1340af41cbef81621999c7e3ad63d02b21 (diff)
Merge "Fix sonar issue EventJob"
-rw-r--r--pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java
index c4b40fc..6e4411d 100644
--- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java
+++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/scheduler/EventJob.java
@@ -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);
}
}