Non-functional changes to silence Sonar
[portal/ric-dashboard.git] / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / controller / SimpleErrorController.java
index 859c913..531ea17 100644 (file)
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.web.servlet.error.ErrorAttributes;
 import org.springframework.boot.web.servlet.error.ErrorController;
 import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.context.request.ServletWebRequest;
 import org.springframework.web.context.request.WebRequest;
@@ -56,7 +56,7 @@ public class SimpleErrorController implements ErrorController {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-       private static final String ERROR_PATH = "/error";
+       public static final String ERROR_PATH = "/error";
        private static final String TRACE = "trace";
        private final ErrorAttributes errorAttributes;
 
@@ -84,7 +84,7 @@ public class SimpleErrorController implements ErrorController {
         *                     HttpServletRequest
         * @return Map of String to Object
         */
-       @RequestMapping(ERROR_PATH)
+       @GetMapping(ERROR_PATH)
        public Map<String, Object> error(HttpServletRequest aRequest) {
                Map<String, Object> body = getErrorAttributes(aRequest, getTraceParameter(aRequest));
                logger.warn("Failed in request for {}", body.get("path"));