On 1 November 2011 08:11, Maurizio Cucchiara <[email protected]> wrote: > You should include the network and broadcast addresses > Try this > > public void testMail() throws Exception { > final SubnetUtils subnetUtils = new SubnetUtils("1.2.3.4/32"); > subnetUtils.setInclusiveHostCount(true);
That fixes the error by increasing the available address count, but I agree with the OP that the current behaviour is unexpected - it would make more sense to return an empty array rather than throwing ArrayIndexOutOfBoundsException. So I created: https://issues.apache.org/jira/browse/NET-428 > String[] address = subnetUtils.getInfo().getAllAddresses(); > assertNotNull(address); > assertEquals(1,address.length); > } > > > Twitter :http://www.twitter.com/m_cucchiara > G+ :https://plus.google.com/107903711540963855921 > Linkedin :http://www.linkedin.com/in/mauriziocucchiara > > Maurizio Cucchiara > > > > 2011/11/1 Kanatoko <[email protected]>: >> new SubnetUtils( "1.2.3.4/32" ).getInfo().getAllAddresses() > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
