Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646
This commit is contained in:
committed by
Juergen Hoeller
parent
224d52e032
commit
4aae6a6dda
@@ -153,15 +153,15 @@ public class SimpleHttpServerFactoryBean implements FactoryBean<HttpServer>, Ini
|
||||
this.server.setExecutor(this.executor);
|
||||
}
|
||||
if (this.contexts != null) {
|
||||
for (String key : this.contexts.keySet()) {
|
||||
HttpContext httpContext = this.server.createContext(key, this.contexts.get(key));
|
||||
this.contexts.forEach((key, context) -> {
|
||||
HttpContext httpContext = this.server.createContext(key, context);
|
||||
if (this.filters != null) {
|
||||
httpContext.getFilters().addAll(this.filters);
|
||||
}
|
||||
if (this.authenticator != null) {
|
||||
httpContext.setAuthenticator(this.authenticator);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.logger.isInfoEnabled()) {
|
||||
this.logger.info("Starting HttpServer at address " + address);
|
||||
|
||||
Reference in New Issue
Block a user