diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java index 2af2286e30c..b3292aeb38a 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessHandler.java @@ -158,6 +158,55 @@ public class InetAccessHandler extends HandlerWrapper _set.exclude(new PatternTuple(connectorName, InetAddressPattern.from(addressPattern), pathSpec)); } + /** + * Includes a connector name. + * + * @param name Connector name to include in this handler. + * @deprecated use {@link InetAccessHandler#include(String)} instead. + */ + @Deprecated + public void includeConnector(String name) + { + throw new UnsupportedOperationException(); + } + + /** + * Excludes a connector name. + * + * @param name Connector name to exclude in this handler. + * @deprecated use {@link InetAccessHandler#include(String)} instead. + */ + @Deprecated + public void excludeConnector(String name) + { + _set.exclude(new PatternTuple(name, null, null)); + } + + /** + * Includes connector names. + * + * @param names Connector names to include in this handler. + * @deprecated use {@link InetAccessHandler#include(String)} instead. + */ + @Deprecated + public void includeConnectors(String... names) + { + throw new UnsupportedOperationException(); + } + + /** + * Excludes connector names. + * + * @param names Connector names to exclude in this handler. + * @deprecated use {@link InetAccessHandler#include(String)} instead. + */ + @Deprecated + public void excludeConnectors(String... names) + { + for (String name : names) + excludeConnector(name); + } + /** * Checks the incoming request against the whitelist and blacklist */ diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java index f5f338ac214..8cf62c3f279 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java @@ -64,7 +64,6 @@ public class InetAccessSet extends AbstractSet imple if (entry == null) return false; - // TODO: Can this be done more efficiently with something like PathMappings. for (PatternTuple tuple : tuples) { if (tuple.test(entry))