Convert to lambda

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
kaizimmerm
2016-09-27 10:41:45 +02:00
parent 06800f185e
commit eb1efb3b5d

View File

@@ -41,14 +41,11 @@ public class PropertyHostnameResolverAutoConfiguration {
@Bean
@ConditionalOnMissingBean(value = HostnameResolver.class)
public HostnameResolver hostnameResolver() {
return new HostnameResolver() {
@Override
public URL resolveHostname() {
try {
return new URL(serverProperties.getUrl());
} catch (final MalformedURLException e) {
throw Throwables.propagate(e);
}
return () -> {
try {
return new URL(serverProperties.getUrl());
} catch (final MalformedURLException e) {
throw Throwables.propagate(e);
}
};
}