Issue #4598 - Changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-02-29 16:14:20 +11:00
parent ccd6c845e5
commit 95ecb4a3e8
2 changed files with 49 additions and 1 deletions

View File

@ -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
*/

View File

@ -64,7 +64,6 @@ public class InetAccessSet extends AbstractSet<InetAccessSet.PatternTuple> 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))