diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnet.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnet.java index 6130b33dee..4284189210 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnet.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnet.java @@ -142,26 +142,4 @@ public class IpSubnet implements IpSet, Comparable { public int compareTo(IpSubnet o) { return cidr.toString().compareTo(o.cidr.toString()); } - - /** - * Simple test functions - * - * @param args where args[0] is the netmask (standard or CIDR notation) and optional args[1] is - * the inetAddress to test with this IpSubnet - */ - public static void main(String[] args) throws Exception { - if (args.length != 0) { - IpSubnet ipSubnet = null; - try { - ipSubnet = new IpSubnet(args[0]); - } catch (UnknownHostException e) { - return; - } - logger.debug("IpSubnet: " + ipSubnet.toString() + " from " + ipSubnet.cidr.getBaseAddress() + " to " - + ipSubnet.cidr.getEndAddress() + " mask " + ipSubnet.cidr.getMask()); - if (args.length > 1) { - logger.debug("Is IN: " + args[1] + " " + ipSubnet.contains(args[1])); - } - } - } } diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpV4Subnet.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpV4Subnet.java index 62be6f430a..0797f549a3 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpV4Subnet.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpV4Subnet.java @@ -252,24 +252,4 @@ public class IpV4Subnet implements IpSet, Comparable { } return 1; } - - /** - * Simple test functions - * - * @param args where args[0] is the netmask (standard or CIDR notation) and optional args[1] is - * the inetAddress to test with this IpV4Subnet - */ - public static void main(String[] args) throws Exception { - if (args.length != 0) { - IpV4Subnet ipV4Subnet = null; - try { - ipV4Subnet = new IpV4Subnet(args[0]); - } catch (UnknownHostException e) { - return; - } - if (args.length > 1) { - logger.debug("Is IN: " + args[1] + " " + ipV4Subnet.contains(args[1])); - } - } - } }