summaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main
diff options
context:
space:
mode:
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) {