diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/InetUtils.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/InetUtils.java index ea386833..c9c1d15b 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/InetUtils.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util/InetUtils.java @@ -160,12 +160,7 @@ public class InetUtils implements Closeable { public HostInfo convertAddress(final InetAddress address) { HostInfo hostInfo = new HostInfo(); - Future result = executorService.submit(new Callable() { - @Override - public String call() throws Exception { - return address.getHostName(); - } - }); + Future result = executorService.submit(address::getHostName); String hostname; try {