From b607cb2751cfe784ffaebec203a56b81bc9812f8 Mon Sep 17 00:00:00 2001 From: Rupinder Date: Fri, 12 Jun 2020 11:01:49 +0530 Subject: lowered sonar code smells Issue-ID: PORTAL-865 Change-Id: Ib4252952e5119d0638a7ba4d354c7f76b005352c Signed-off-by: Rupinder --- .../portalsdk/rnotebookintegration/controller/NotebookController.java | 4 ++-- .../rnotebookintegration/controller/NotebookTestController.java | 4 ++-- .../rnotebookintegration/controller/RNoteBookController.java | 4 ++-- .../rnotebookintegration/controller/RNoteBookFEController.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'ecomp-sdk/epsdk-workflow/src') diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java index 4af5d21c..18c4222a 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java @@ -40,14 +40,14 @@ package org.onap.portalsdk.rnotebookintegration.controller; import org.onap.portalsdk.core.controller.RestrictedBaseController; 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.servlet.ModelAndView; @Controller @RequestMapping("/") public class NotebookController extends RestrictedBaseController{ - @RequestMapping(value = {"/notebook" }, method = RequestMethod.GET) + @GetMapping(value = {"/notebook" }) public ModelAndView noteBook() { return new ModelAndView(getViewName()); } diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java index f608586d..95c00e41 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java @@ -41,14 +41,14 @@ package org.onap.portalsdk.rnotebookintegration.controller; import org.onap.portalsdk.core.controller.RestrictedBaseController; 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.servlet.ModelAndView; @Controller @RequestMapping("/") public class NotebookTestController extends RestrictedBaseController { - @RequestMapping(value = { "/nbooktest" }, method = RequestMethod.GET) + @GetMapping(value = { "/nbooktest" }) public ModelAndView noteBook() { return new ModelAndView(getViewName()); } diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java index 82e88f23..f37d16f0 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java @@ -47,7 +47,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; 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.bind.annotation.ResponseBody; @Controller @@ -67,7 +67,7 @@ public class RNoteBookController extends RestrictedRESTfulBaseController { this.rNoteBookIntegrationService = rNoteBookIntegrationService; } - @RequestMapping(value = { "authCr" }, method = RequestMethod.GET, produces = "application/json") + @GetMapping(value = { "authCr" }, produces = "application/json") @ResponseBody public ResponseEntity getRNotebookCredentials(String token) { String returnJSON = ""; diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java index 3bf81f6d..fefade2d 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java @@ -58,7 +58,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller @@ -78,7 +78,7 @@ public class RNoteBookFEController extends RestrictedBaseController { this.rNoteBookIntegrationService = rNoteBookIntegrationService; } - @RequestMapping(value = { "authCr" }, method = RequestMethod.POST, produces = "application/json") + @PostMapping(value = { "authCr" }, produces = "application/json") @ResponseBody public ResponseEntity saveRNotebookCredentials(@RequestBody String notebookId, HttpServletRequest request, HttpServletResponse response) { -- cgit 1.2.3-korg