summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-06-12 11:01:49 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-06-12 11:02:05 +0530
commitb607cb2751cfe784ffaebec203a56b81bc9812f8 (patch)
treea58e51e526b9d1a62371edbada60e98b43fd731c
parent88a56a8071697d2a7dfa7db7e32c8a496218fb70 (diff)
lowered sonar code smells
Issue-ID: PORTAL-865 Change-Id: Ib4252952e5119d0638a7ba4d354c7f76b005352c Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java4
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java1
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java1
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java2
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java1
-rw-r--r--ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookController.java4
-rw-r--r--ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/NotebookTestController.java4
-rw-r--r--ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookController.java4
-rw-r--r--ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/rnotebookintegration/controller/RNoteBookFEController.java4
10 files changed, 12 insertions, 17 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java
index 50e6d096..6147f960 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/ReportDashboardController.java
@@ -45,7 +45,7 @@ import javax.servlet.http.HttpServletRequest;
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;
/**
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/")
public class ReportDashboardController extends RestrictedBaseController {
- @RequestMapping(value = {"/report_dashboard" }, method = RequestMethod.GET)
+ @GetMapping(value = {"/report_dashboard" })
public ModelAndView adminView(HttpServletRequest request) {
Map<String, Object> model = new HashMap<>();
return new ModelAndView(getViewName(),"model", model);
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java
index 5adaf66e..ef979e69 100644
--- a/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/sample/SamplePageController.java
@@ -45,7 +45,7 @@ import javax.servlet.http.HttpServletRequest;
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;
/**
@@ -56,7 +56,7 @@ import org.springframework.web.servlet.ModelAndView;
@RequestMapping("/")
public class SamplePageController extends RestrictedBaseController {
- @RequestMapping(value = { "/samplePage" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/samplePage" })
public ModelAndView plot(HttpServletRequest request) {
Map<String, Object> model = new HashMap<>();
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
index 3a7baccd..3d5e1931 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/interceptor/ResourceInterceptor.java
@@ -59,7 +59,6 @@ import org.onap.portalsdk.core.service.DataAccessService;
import org.onap.portalsdk.core.service.LoginService;
import org.onap.portalsdk.core.service.UrlAccessService;
import org.onap.portalsdk.core.service.WebServiceCallService;
-import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java
index d7b734ce..0963ef01 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java
@@ -42,7 +42,6 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
-import org.onap.portalsdk.core.logging.aspect.MetricsLog;
import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
@Aspect
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java
index d0450966..c1df3263 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginExternalAuthServiceImpl.java
@@ -52,8 +52,6 @@ import org.onap.portalsdk.core.domain.Role;
import org.onap.portalsdk.core.domain.User;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.menu.MenuBuilder;
-import org.onap.portalsdk.core.service.DataAccessService;
-import org.onap.portalsdk.core.service.LoginServiceCentralizedImpl;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.portalsdk.core.web.support.AppUtils;
import org.onap.portalsdk.core.web.support.UserUtils;
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
index 7df80183..024a51b2 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserApiServiceImpl.java
@@ -60,7 +60,6 @@ import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
import org.onap.portalsdk.core.onboarding.util.KeyConstants;
import org.onap.portalsdk.core.onboarding.util.KeyProperties;
-import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.portalsdk.external.authorization.domain.ExternalAccessPerms;
import org.onap.portalsdk.external.authorization.domain.ExternalAccessRole;
import org.onap.portalsdk.external.authorization.domain.ExternalAccessUserRoleDetail;
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<String> 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<String> saveRNotebookCredentials(@RequestBody String notebookId, HttpServletRequest request,
HttpServletResponse response) {