Socks5MultiDiscovery: Don't create useless array

We create an array in the getPeers method and throw it away without
using it.
This commit is contained in:
Alva Swanson 2024-11-05 01:03:45 +00:00
parent f92f4e8da0
commit bb3acb3fa9
No known key found for this signature in database
GPG Key ID: 004760E77F753090

View File

@ -75,7 +75,7 @@ public class Socks5MultiDiscovery implements PeerDiscovery {
list.addAll(Arrays.asList(discovery.getPeers(services, timeoutValue, timeoutUnit)));
}
return list.toArray(new InetSocketAddress[list.size()]);
return list.toArray(new InetSocketAddress[0]);
}
@Override