polish, move to method reference.

This commit is contained in:
Spencer Gibb
2018-03-21 12:32:39 -04:00
parent b16b77f1dc
commit ca1a97a3a4

View File

@@ -160,12 +160,7 @@ public class InetUtils implements Closeable {
public HostInfo convertAddress(final InetAddress address) {
HostInfo hostInfo = new HostInfo();
Future<String> result = executorService.submit(new Callable<String>() {
@Override
public String call() throws Exception {
return address.getHostName();
}
});
Future<String> result = executorService.submit(address::getHostName);
String hostname;
try {