From 70fcb5b99af1febe32f021f03bcf8ac9f32489d5 Mon Sep 17 00:00:00 2001 From: ilanap Date: Sun, 1 Dec 2019 10:10:33 +0200 Subject: Sonar fixes for API to retrieve UI configuration Added configuration file with the menu configuration from catalog-ui. Added to the configuration manager. to chef and to the ui rest APIs. Issue-ID: SDC-2663 Signed-off-by: ilanap Change-Id: I032a7666f470e7d4797a555470bf9eb4a43cfcc4 --- .../java/org/openecomp/sdc/fe/servlets/ConfigServlet.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'catalog-fe/src/main') diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java index 08b7c43397..f3880ed791 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java @@ -48,6 +48,8 @@ import javax.ws.rs.core.Response.Status; public class ConfigServlet extends LoggingServlet { private static final Logger LOGGER = LoggerFactory.getLogger(ConfigServlet.class.getName()); + public static final String UNEXPECTED_FE_RESPONSE_LOGGING_ERROR = "Unexpected FE response logging error :"; + public static final String ERROR_FE_RESPONSE = "FE Response"; @GET @Path("/ui/workspace") @@ -73,8 +75,8 @@ public class ConfigServlet extends LoggingServlet { return response; } catch (Exception e) { - FeEcompErrorManager.getInstance().logFeHttpLoggingError("FE Response"); - LOGGER.error("Unexpected FE response logging error :", e); + FeEcompErrorManager.getInstance().logFeHttpLoggingError(ERROR_FE_RESPONSE); + LOGGER.error(UNEXPECTED_FE_RESPONSE_LOGGING_ERROR, e); return Response.status(Status.INTERNAL_SERVER_ERROR).entity("{}").build(); } @@ -101,8 +103,8 @@ public class ConfigServlet extends LoggingServlet { return response; } catch (Exception e) { - FeEcompErrorManager.getInstance().logFeHttpLoggingError("FE Response"); - LOGGER.error("Unexpected FE response logging error :", e); + FeEcompErrorManager.getInstance().logFeHttpLoggingError( ERROR_FE_RESPONSE); + LOGGER.error(UNEXPECTED_FE_RESPONSE_LOGGING_ERROR, e); return Response.status(Status.INTERNAL_SERVER_ERROR).entity("{}").build(); } @@ -133,8 +135,8 @@ public class ConfigServlet extends LoggingServlet { return response; } catch (Exception e) { - FeEcompErrorManager.getInstance().logFeHttpLoggingError("FE Response"); - LOGGER.error("Unexpected FE response logging error :", e); + FeEcompErrorManager.getInstance().logFeHttpLoggingError(ERROR_FE_RESPONSE); + LOGGER.error(UNEXPECTED_FE_RESPONSE_LOGGING_ERROR, e); return Response.status(Status.INTERNAL_SERVER_ERROR).entity("{}").build(); } } -- cgit 1.2.3-korg