From e02f5fbb88b7fabc07121a9dcffd3840e2c1a12a Mon Sep 17 00:00:00 2001 From: Rupinder Date: Fri, 8 May 2020 11:19:10 +0530 Subject: [PATCH] removed code smells Issue-ID: PORTAL-865 Change-Id: I9940591ac0a176b961347950525c5bdf3ae06bf0 Signed-off-by: Rupinder --- .../onap/portalapp/portal/controller/BEPropertyReaderController.java | 1 - .../onap/portalapp/portal/controller/BasicAuthAccountController.java | 2 -- .../org/onap/portalapp/portal/controller/CommonWidgetController.java | 2 -- .../java/org/onap/portalapp/portal/controller/DashboardController.java | 3 --- .../portalapp/portal/controller/DashboardSearchResultController.java | 3 --- .../org/onap/portalapp/portal/controller/EncryptAdminController.java | 3 ++- .../portalapp/portal/controller/ExternalAccessRolesController.java | 2 -- 7 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BEPropertyReaderController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BEPropertyReaderController.java index 4ebe6b59..60164967 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BEPropertyReaderController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BEPropertyReaderController.java @@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.onap.portalapp.portal.domain.BEProperty; diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BasicAuthAccountController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BasicAuthAccountController.java index ab040bb0..24c08f3a 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BasicAuthAccountController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BasicAuthAccountController.java @@ -59,12 +59,10 @@ import org.springframework.beans.factory.annotation.Autowired; 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 diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/CommonWidgetController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/CommonWidgetController.java index 417a2940..66b9df20 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/CommonWidgetController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/CommonWidgetController.java @@ -47,9 +47,7 @@ import org.onap.portalapp.portal.service.DashboardSearchService; import org.onap.portalapp.portal.transport.CommonWidgetMeta; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardController.java index 17a28476..ff89bb88 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardController.java @@ -80,9 +80,6 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java index 2a1b9e80..6ad88aef 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/DashboardSearchResultController.java @@ -70,9 +70,6 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/EncryptAdminController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/EncryptAdminController.java index 258a7fd5..c57dc4f9 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/EncryptAdminController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/EncryptAdminController.java @@ -59,6 +59,7 @@ import org.onap.portalsdk.core.service.DataAccessService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -75,7 +76,7 @@ public class EncryptAdminController implements BasicAuthenticationController { EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EncryptAdminController.class); - @RequestMapping(value = { "/executeEncryptQuery" }, method = RequestMethod.POST) + @PostMapping(value = { "/executeEncryptQuery" }) public Map executeEncrypt(HttpServletRequest request, HttpServletResponse response) throws CipherUtilException { diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java index 103e3386..83b5155d 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java @@ -94,9 +94,7 @@ 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; import com.fasterxml.jackson.databind.DeserializationFeature; -- 2.16.6