From ed207457c8f1604c72c7f9942a46c30013cdf0fb Mon Sep 17 00:00:00 2001 From: Arindam Mondal Date: Mon, 21 Oct 2019 13:38:36 +0900 Subject: General sonar improvements +) Format logger witth log formatter ++) remove unused imports Issue-ID: SO-2381 Change-Id: If8b8f2377ae3b7c8d8a270792eaf99a04cfa7ef0 Signed-off-by: Arindam Mondal Signed-off-by: arind.mondal --- .../org/onap/so/monitoring/rest/api/SoMonitoringController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'so-monitoring') diff --git a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java index 1e5f8780d6..5a5a4143fa 100644 --- a/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java +++ b/so-monitoring/so-monitoring-service/src/main/java/org/onap/so/monitoring/rest/api/SoMonitoringController.java @@ -83,7 +83,7 @@ public class SoMonitoringController { return Response.status(Status.OK).entity(processInstanceId.get()).build(); } - LOGGER.error("Unable to find process instance id for : " + requestId); + LOGGER.error("Unable to find process instance id for : {} ", requestId); return Response.status(Status.NO_CONTENT).build(); } catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) { @@ -112,7 +112,7 @@ public class SoMonitoringController { return Response.status(Status.OK).entity(processInstanceDetail.get()).build(); } - LOGGER.error("Unable to find process instance id for : " + processInstanceId); + LOGGER.error("Unable to find process instance id for : {}", processInstanceId); return Response.status(Status.NO_CONTENT).build(); } catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) { @@ -141,7 +141,7 @@ public class SoMonitoringController { final ProcessDefinitionDetail definitionDetail = response.get(); return Response.status(Status.OK).entity(definitionDetail).build(); } - LOGGER.error("Unable to find process definition xml for processDefinitionId: " + processDefinitionId); + LOGGER.error("Unable to find process definition xml for processDefinitionId: {}", processDefinitionId); return Response.status(Status.NO_CONTENT).build(); } catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) { @@ -215,7 +215,7 @@ public class SoMonitoringController { try { final List requests = databaseServiceProvider.getSoInfraRequest(filters, startTime, endTime, maxResult); - LOGGER.info("result size: " + requests.size()); + LOGGER.info("result size: {}", requests.size()); return Response.status(Status.OK).entity(requests).build(); } catch (final InvalidRestRequestException | HttpResouceNotFoundException extensions) { -- cgit 1.2.3-korg