You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2017/12/13 01:08:04 UTC

[GitHub] merlimat closed pull request #957: Removed unused client version filter method in WebService

merlimat closed pull request #957: Removed unused client version filter method in WebService
URL: https://github.com/apache/incubator-pulsar/pull/957
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
index edefa2aaa..cb5584fb2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java
@@ -25,8 +25,6 @@
 import java.util.TimeZone;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.servlet.DispatcherType;
 
@@ -56,7 +54,6 @@
 import org.slf4j.LoggerFactory;
 
 import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 
 import io.netty.util.concurrent.DefaultThreadFactory;
@@ -66,12 +63,6 @@
  */
 public class WebService implements AutoCloseable {
 
-    /**
-     * The set of path regexes on which the ApiVersionFilter is installed if needed
-     */
-    private static final List<Pattern> API_VERSION_FILTER_PATTERNS = ImmutableList.of(
-            Pattern.compile("^/lookup.*") // V2 lookups
-    );
     private static final String MATCH_ALL = "/*";
 
     public static final String ATTRIBUTE_PULSAR_NAME = "pulsar";
@@ -161,23 +152,6 @@ public void addStaticResources(String basePath, String resourcePath) {
         handlers.add(capHandler);
     }
 
-    /**
-     * Checks to see if the given path matches any of the api version filter paths.
-     *
-     * @param path
-     *            the path to check
-     * @return true if the ApiVersionFilter can be installed on the path
-     */
-    private boolean shouldCheckApiVersionOnPath(String path) {
-        for (Pattern filterPattern : API_VERSION_FILTER_PATTERNS) {
-            Matcher matcher = filterPattern.matcher(path);
-            if (matcher.matches()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     public void start() throws PulsarServerException {
         try {
             RequestLogHandler requestLogHandler = new RequestLogHandler();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services