From 7f6929e5ea6da4015090b3adac73b35f9b3afb18 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 12 Mar 2020 15:16:44 -0400 Subject: Fix sonar issues in drools-applications Fixed various sonar issues, including moving some code to policy-common. Fixed some eclipse warnings, including deprecated junit APIs. Issue-ID: POLICY-2426 Signed-off-by: Jim Hahn Change-Id: I10b40c1e5af62308f2e4c315e4d399aafff2998f --- .../org/onap/policy/drools/server/restful/RestControlLoopManager.java | 4 ++-- .../onap/policy/drools/server/restful/RestControlLoopManagerTest.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'controlloop/common/feature-controlloop-management') diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java index 35aabe424..0f35b733b 100644 --- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java +++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java @@ -79,7 +79,7 @@ public class RestControlLoopManager { return Response.status(Response.Status.OK).entity(controlLoopNames).build(); } catch (IllegalArgumentException e) { - logger.error("{}", e); + logger.error("'GET' controlloops threw an exception", e); return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build(); } } @@ -109,7 +109,7 @@ public class RestControlLoopManager { return Response.status(Response.Status.OK).entity(controlLoopParams).build(); } catch (IllegalArgumentException e) { - logger.error("{}", e); + logger.error("'GET' controlloop threw an exception", e); return Response.status(Response.Status.NOT_FOUND).entity(e.getMessage()).build(); } } diff --git a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java index 7fad4468d..2a5bffc7f 100644 --- a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java +++ b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java @@ -82,7 +82,6 @@ public class RestControlLoopManagerTest { private static final String URL_CONTEXT_PATH_TOOLS_AAI = URL_CONTEXT_PATH_TOOLS + "aai/"; private static final String URL_CONTEXT_PATH_TOOLS_AAI_CQ = URL_CONTEXT_PATH_TOOLS_AAI + "customQuery/"; - private static final String POLICY = "src/test/resources/vCPE.yaml"; private static final String CONTROLLER_FILE = "op-controller.properties"; private static final String CONTROLLER_FILE_BAK = "op-controller.properties.bak"; -- cgit 1.2.3-korg