diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2019-07-16 11:09:50 +0200 |
---|---|---|
committer | Tomasz Golabek <tomasz.golabek@nokia.com> | 2019-07-17 10:08:01 +0000 |
commit | 6e94aaf9e091b2fbd596a4a521ffa7fddc065511 (patch) | |
tree | dad5ee117a0f4e4350c873fc93291b6e81b4acc1 /catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java | |
parent | 96e5fc67fd0da6e1a966944d5c6fed1a30931d90 (diff) |
fixing warnings from checkstyle in catalog-fe
Issue-ID: SDC-2454
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: I1fbeccb8c661233b81fea787457631f4a898fd46
Diffstat (limited to 'catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java')
-rw-r--r-- | catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java index 547f8ac367..8608506694 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,46 +43,46 @@ import javax.ws.rs.core.MediaType; @Path("/configmgr") public class ConfigMgrServlet extends BasicServlet { - private static Logger log = LoggerFactory.getLogger(ConfigMgrServlet.class.getName()); + private static Logger log = LoggerFactory.getLogger(ConfigMgrServlet.class.getName()); - @GET - @Path("/get") - @Produces(MediaType.APPLICATION_JSON) - public String getConfig(@Context final HttpServletRequest request, @QueryParam("type") String type) { + @GET + @Path("/get") + @Produces(MediaType.APPLICATION_JSON) + public String getConfig(@Context final HttpServletRequest request, @QueryParam("type") String type) { - String result = null; + String result = null; - ServletContext context = request.getSession().getServletContext(); + ServletContext context = request.getSession().getServletContext(); - ConfigurationManager configurationManager = (ConfigurationManager) context - .getAttribute(Constants.CONFIGURATION_MANAGER_ATTR); + ConfigurationManager configurationManager = (ConfigurationManager) context + .getAttribute(Constants.CONFIGURATION_MANAGER_ATTR); - if (type == null || type.equals("configuration")) { + if (type == null || type.equals("configuration")) { - Configuration configuration = configurationManager.getConfiguration(); - if (configuration == null) { - log.warn("Configuration of type {} was not found", Configuration.class); - } else { - log.info("The value returned from getConfig is {}", configuration); + Configuration configuration = configurationManager.getConfiguration(); + if (configuration == null) { + log.warn("Configuration of type {} was not found", Configuration.class); + } else { + log.info("The value returned from getConfig is {}", configuration); - result = gson.toJson(configuration); + result = gson.toJson(configuration); - } - } else if (type.equals("rest")) { + } + } else if (type.equals("rest")) { - RestConfigurationInfo configuration = configurationManager.getRestClientConfiguration(); - if (configuration == null) { - log.warn("Configuration of type {} was not found", RestConfigurationInfo.class); - } else { - log.info("The value returned from getConfig is {}", configuration); + RestConfigurationInfo configuration = configurationManager.getRestClientConfiguration(); + if (configuration == null) { + log.warn("Configuration of type {} was not found", RestConfigurationInfo.class); + } else { + log.info("The value returned from getConfig is {}", configuration); - result = gson.toJson(configuration); + result = gson.toJson(configuration); - } + } - } - return result; + } + return result; - } + } } |