From a1eed7032f548f1ed080c5a761466117000df44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <954649679@qq.com> Date: Thu, 4 Feb 2021 10:13:16 +0800 Subject: [PATCH] Remove unused code (#1991) Remove unused code in DefaultBlockExceptionHandler#handle --- .../webmvc/callback/DefaultBlockExceptionHandler.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java b/sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java index acb74d0e..0ad80095 100644 --- a/sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java +++ b/sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/DefaultBlockExceptionHandler.java @@ -34,12 +34,6 @@ public class DefaultBlockExceptionHandler implements BlockExceptionHandler { // Return 429 (Too Many Requests) by default. response.setStatus(429); - StringBuffer url = request.getRequestURL(); - - if ("GET".equals(request.getMethod()) && StringUtil.isNotBlank(request.getQueryString())) { - url.append("?").append(request.getQueryString()); - } - PrintWriter out = response.getWriter(); out.print("Blocked by Sentinel (flow limiting)"); out.flush();