fixed code smells 94/108794/1
authorRupinder <rupinsi1@in.ibm.com>
Fri, 5 Jun 2020 05:20:08 +0000 (10:50 +0530)
committerRupinder <rupinsi1@in.ibm.com>
Fri, 5 Jun 2020 05:20:22 +0000 (10:50 +0530)
Issue-ID: PORTAL-865
Change-Id: I24ba94bb568734c79ca1e7e676e0f8e64902e080
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupController.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/WidgetsController.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/SearchServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/utils/MusicCookieCsrfTokenRepository.java
ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/ECOMPLogoutController.java

index 0c464fb..eba0faf 100644 (file)
@@ -51,8 +51,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
@@ -89,7 +88,7 @@ public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController
                });
        }
 
-       @RequestMapping(value = "/portalApi/microservices/markup/{widgetId}", method = RequestMethod.GET)
+       @GetMapping(value = "/portalApi/microservices/markup/{widgetId}")
        public String getWidgetMarkup(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
                return template
index 56f5040..306a0ef 100644 (file)
@@ -64,12 +64,10 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 @RestController
index c766106..07c1ea6 100644 (file)
@@ -40,8 +40,6 @@ package org.onap.portalapp.portal.service;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.onap.portalapp.portal.service.SearchService;
-import org.onap.portalapp.portal.service.SearchServiceImpl;
 import org.onap.portalapp.portal.domain.EPUser;
 import org.onap.portalapp.portal.logging.aop.EPMetricsLog;
 import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle;
index 891f6d7..afe5636 100644 (file)
@@ -62,7 +62,6 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.HashMap;
 import java.util.Map;
-import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
 
 
 public final class MusicCookieCsrfTokenRepository implements CsrfTokenRepository {
index 54fcf3a..eaf3a13 100644 (file)
@@ -52,7 +52,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.context.annotation.Profile;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import org.springframework.web.servlet.ModelAndView;
@@ -69,7 +69,7 @@ public class ECOMPLogoutController extends EPUnRestrictedBaseController {
     EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ECOMPLogoutController.class);
 
     @EPAuditLog
-    @RequestMapping(value = { "/logout.htm" }, method = RequestMethod.GET)
+    @GetMapping(value = { "/logout.htm" })
     public ModelAndView logOut(HttpServletRequest request,
             HttpServletResponse response) throws Exception {