@Test public void testNMS4972() throws Exception { String ip1 = "1.1.1.1"; String ip2 = "255.255.255.255"; Assert.assertFalse(BigInteger.ZERO.compareTo(InetAddressUtils.difference(ip1, ip2)) < 0); }
public static BigInteger difference(final String addr1, final String addr2) { return difference(getInetAddress(addr1), getInetAddress(addr2)); }
InetAddressUtils { public static BigInteger difference(final String addr1, final String addr2) { return difference(getInetAddress(addr1), getInetAddress(addr2)); } }
InetAddressUtils { public static BigInteger difference(final String addr1, final String addr2) { return difference(getInetAddress(addr1), getInetAddress(addr2)); }  }
InetAddressUtils { public static BigInteger difference(final String addr1, final String addr2) { return difference(getInetAddress(addr1), getInetAddress(addr2)); }  static InetAddress getLocalHostAddress(); static String getLocalHostAddressAsString(); static String getLocalHostName(); static String incr(final String address); static byte[] incr(final byte[] address); static String decr(final String address); static byte[] decr(final byte[] address); static InetAddress getInetAddress(final int[] octets, final int offset, final int length); static InetAddress getInetAddress(final byte[] ipAddrOctets); static InetAddress getInetAddress(final String dottedNotation); static InetAddress resolveHostname(final String hostname, final boolean preferInet6Address); static InetAddress resolveHostname(final String hostname, final boolean preferInet6Address, final boolean throwException); static byte[] toIpAddrBytes(final String dottedNotation); static String toIpAddrString(final InetAddress addr); static String toIpAddrString(final byte[] addr); static InetAddress getLowestInetAddress(final List<InetAddress> addresses); static BigInteger difference(final String addr1, final String addr2); static BigInteger difference(final InetAddress addr1, final InetAddress addr2); static boolean isInetAddressInRange(final byte[] laddr, final String beginString, final String endString); static boolean isInetAddressInRange(final String addrString, final String beginString, final String endString); static boolean inSameScope(final InetAddress addr1, final InetAddress addr2); static boolean isInetAddressInRange(final byte[] addr, final byte[] begin, final byte[] end); static boolean isInetAddressInRange(final String ipAddr, final byte[] begin, final byte[] end); static InetAddress convertCidrToInetAddressV4(int cidr); static InetAddress convertCidrToInetAddressV6(int cidr); static InetAddress convertBigIntegerIntoInetAddress(final BigInteger i); static InetAddress addr(final String ipAddrString); static String normalize(final String ipAddrString); static String str(final InetAddress addr); static BigInteger toInteger(final InetAddress ipAddress); static String toOid(final InetAddress addr); static byte[] macAddressStringToBytes(String macAddress); static String macAddressBytesToString(byte[] macAddress); static String normalizeMacAddress(String macAddress); }
InetAddressUtils { public static BigInteger difference(final String addr1, final String addr2) { return difference(getInetAddress(addr1), getInetAddress(addr2)); }  static InetAddress getLocalHostAddress(); static String getLocalHostAddressAsString(); static String getLocalHostName(); static String incr(final String address); static byte[] incr(final byte[] address); static String decr(final String address); static byte[] decr(final byte[] address); static InetAddress getInetAddress(final int[] octets, final int offset, final int length); static InetAddress getInetAddress(final byte[] ipAddrOctets); static InetAddress getInetAddress(final String dottedNotation); static InetAddress resolveHostname(final String hostname, final boolean preferInet6Address); static InetAddress resolveHostname(final String hostname, final boolean preferInet6Address, final boolean throwException); static byte[] toIpAddrBytes(final String dottedNotation); static String toIpAddrString(final InetAddress addr); static String toIpAddrString(final byte[] addr); static InetAddress getLowestInetAddress(final List<InetAddress> addresses); static BigInteger difference(final String addr1, final String addr2); static BigInteger difference(final InetAddress addr1, final InetAddress addr2); static boolean isInetAddressInRange(final byte[] laddr, final String beginString, final String endString); static boolean isInetAddressInRange(final String addrString, final String beginString, final String endString); static boolean inSameScope(final InetAddress addr1, final InetAddress addr2); static boolean isInetAddressInRange(final byte[] addr, final byte[] begin, final byte[] end); static boolean isInetAddressInRange(final String ipAddr, final byte[] begin, final byte[] end); static InetAddress convertCidrToInetAddressV4(int cidr); static InetAddress convertCidrToInetAddressV6(int cidr); static InetAddress convertBigIntegerIntoInetAddress(final BigInteger i); static InetAddress addr(final String ipAddrString); static String normalize(final String ipAddrString); static String str(final InetAddress addr); static BigInteger toInteger(final InetAddress ipAddress); static String toOid(final InetAddress addr); static byte[] macAddressStringToBytes(String macAddress); static String macAddressBytesToString(byte[] macAddress); static String normalizeMacAddress(String macAddress); static final InetAddress UNPINGABLE_ADDRESS; static final InetAddress UNPINGABLE_ADDRESS_IPV6; static final InetAddress ZEROS; static final InetAddress TWO_FIFTY_FIVES; static final InetAddress ONE_TWENTY_SEVEN; }