Convert to lambda
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -41,14 +41,11 @@ public class PropertyHostnameResolverAutoConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(value = HostnameResolver.class)
|
@ConditionalOnMissingBean(value = HostnameResolver.class)
|
||||||
public HostnameResolver hostnameResolver() {
|
public HostnameResolver hostnameResolver() {
|
||||||
return new HostnameResolver() {
|
return () -> {
|
||||||
@Override
|
try {
|
||||||
public URL resolveHostname() {
|
return new URL(serverProperties.getUrl());
|
||||||
try {
|
} catch (final MalformedURLException e) {
|
||||||
return new URL(serverProperties.getUrl());
|
throw Throwables.propagate(e);
|
||||||
} catch (final MalformedURLException e) {
|
|
||||||
throw Throwables.propagate(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user