From ca1a97a3a484910527b17e95ae2cc6e1c06722c6 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Wed, 21 Mar 2018 12:32:39 -0400 Subject: [PATCH] polish, move to method reference. --- .../org/springframework/cloud/commons/util/InetUtils.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 {