aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main
diff options
context:
space:
mode:
authorJulienBe <julien.bertozzi@intl.att.com>2021-01-19 10:54:52 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-01-20 10:34:31 +0000
commit5ce2da3100483eb505876b428c7c490ff445ba5c (patch)
treefdff7d173e531ed0f5a3f47652fc84b51a732bc9 /catalog-fe/src/main
parent3315931d554d25687737084ba70e23432e96c030 (diff)
Remove dead code
Remove unused variables Remove unnecessary statements Issue-ID: SDC-3428 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com> Change-Id: Iddc8ffdc141edd409d50f90c03cb6612f6ebf042 Signed-off-by: JulienBe <julien.bertozzi@intl.att.com>
Diffstat (limited to 'catalog-fe/src/main')
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java5
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java9
2 files changed, 4 insertions, 10 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
index a2b0adb4fe..13ff206ad8 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/impl/PluginStatusBL.java
@@ -110,8 +110,6 @@ public class PluginStatusBL {
}
public String getPluginsList() {
- String result = null;
-
if (pluginsConfiguration == null || pluginsConfiguration.getPluginsList() == null) {
log.warn("Configuration of type {} was not found", PluginsConfiguration.class);
throw new InvalidArgumentException("the plugin configuration was not read successfully.");
@@ -119,9 +117,8 @@ public class PluginStatusBL {
} else {
log.debug("The value returned from getConfig is {}", pluginsConfiguration);
- result = gson.toJson(pluginsConfiguration.getPluginsList());
+ return gson.toJson(pluginsConfiguration.getPluginsList());
}
- return result;
}
public String getPluginAvailability(String pluginId) {
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java
index c9d660a48e..18c6a645c4 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java
@@ -94,8 +94,6 @@ public class PortalServlet extends HttpServlet {
// Check if we got header from webseal
String userId = request.getHeader(Constants.WEBSEAL_USER_ID_HEADER);
- String firstNameFromCookie = "";
- String lastNameFromCookie = "";
if (null == userId) {
// Authentication via ecomp portal
try {
@@ -148,8 +146,8 @@ public class PortalServlet extends HttpServlet {
if (allHeadersExist) {
addCookies(response, mutableRequest, getMandatoryHeaders(request));
addCookies(response, mutableRequest, getOptionalHeaders(request));
- firstNameFromCookie = getValueFromCookie(request, Constants.HTTP_CSP_FIRSTNAME );
- lastNameFromCookie = getValueFromCookie(request, Constants.HTTP_CSP_LASTNAME);
+ getValueFromCookie(request, Constants.HTTP_CSP_FIRSTNAME );
+ getValueFromCookie(request, Constants.HTTP_CSP_LASTNAME);
//To be fixed
//addAuthCookie(response, userId, firstNameFromCookie, lastNameFromCookie);
@@ -162,7 +160,6 @@ public class PortalServlet extends HttpServlet {
boolean addAuthCookie(HttpServletResponse response, String userId, String firstName, String lastName) throws IOException {
boolean isBuildCookieCompleted = true;
- AuthenticationCookie authenticationCookie = null;
Cookie authCookie = null;
Configuration.CookieConfig confCookie =
ConfigurationManager.getConfigurationManager().getConfiguration().getAuthCookie();
@@ -171,7 +168,7 @@ public class PortalServlet extends HttpServlet {
String encryptedCookie = "";
try {
- authenticationCookie = new AuthenticationCookie(userId, firstName, lastName);
+ AuthenticationCookie authenticationCookie = new AuthenticationCookie(userId, firstName, lastName);
String cookieAsJson = RepresentationUtils.toRepresentation(authenticationCookie);
encryptedCookie = org.onap.sdc.security.CipherUtil.encryptPKC(cookieAsJson, confCookie.getSecurityKey());
} catch (Exception e) {