Merge pull request #7280 from alvasw/Socks5MultiDiscovery_Dont_create_useless_array

Socks5MultiDiscovery: Don't create useless array
This commit is contained in:
Alejandro García 2024-11-05 05:07:27 +00:00 committed by GitHub
commit 25009074ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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