summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilanap <ilanap@amdocs.com>2019-12-01 10:10:33 +0200
committerOren Kleks <oren.kleks@amdocs.com>2019-12-01 09:44:59 +0000
commit70fcb5b99af1febe32f021f03bcf8ac9f32489d5 (patch)
treef8170010a950134224db740911eeb4e49cae090f
parentf1f5a3581dca423dc9a687153eb0032f8311d6bd (diff)
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 <ilanap@amdocs.com> Change-Id: I032a7666f470e7d4797a555470bf9eb4a43cfcc4
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java14
1 files changed, 8 insertions, 6 deletions
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();
}
}