Removed unused client version filter method in WebService
@@ -25,8 +25,6 @@ import java.util.List;
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.Logger;
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 @@ import io.netty.util.concurrent.DefaultThreadFactory;
*/
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 class WebService implements AutoCloseable {
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();
