From cc469a136d129130c840f560efe76d0056aea3e7 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 23 Aug 2024 12:01:16 +0200 Subject: [PATCH] Code/Import cleanups. Signed-off-by: Simone Bordet --- .../jetty/rewrite/handler/ResponseStatusHeaderRegexRule.java | 3 --- .../rewrite/handler/ResponseStatusHeaderRegexRuleTest.java | 1 - 2 files changed, 4 deletions(-) diff --git a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRule.java b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRule.java index d127037eb0e..c8ba6221189 100644 --- a/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRule.java +++ b/jetty-core/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRule.java @@ -14,14 +14,12 @@ package org.eclipse.jetty.rewrite.handler; import java.io.IOException; -import java.lang.IllegalArgumentException; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.server.Response; import org.eclipse.jetty.util.Callback; -import org.eclipse.jetty.util.StringUtil; /** * Sends a response with the configured status code whenever the value of the configured request header matches a regular expression. @@ -125,7 +123,6 @@ public class ResponseStatusHeaderRegexRule extends Rule protected boolean handle(Response response, Callback callback) { Response.writeError(this, response, callback, _code, _message); - return true; } }; diff --git a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRuleTest.java b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRuleTest.java index bf49a5bed4c..bb344bde25b 100644 --- a/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRuleTest.java +++ b/jetty-core/jetty-rewrite/src/test/java/org/eclipse/jetty/rewrite/handler/ResponseStatusHeaderRegexRuleTest.java @@ -13,7 +13,6 @@ package org.eclipse.jetty.rewrite.handler; -import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpTester; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Request;