Provide size of array.

This commit is contained in:
Carsten Otto 2015-07-04 17:49:22 +02:00 committed by Andreas Schildbach
parent 3e78d89cac
commit 467356526e

View file

@ -185,7 +185,7 @@ public class IrcDiscovery implements PeerDiscovery {
log.warn("Exception whilst closing IRC discovery: " + e.toString());
}
}
return addresses.toArray(new InetSocketAddress[]{});
return addresses.toArray(new InetSocketAddress[addresses.size()]);
}
private void logAndSend(String command) throws Exception {