Merge pull request #17893 from kioyong

* pr/17893:
  Simplify some code

Closes gh-17893
pull/17913/head
Stephane Nicoll 5 years ago
commit 78ea423148

@ -69,7 +69,7 @@ abstract class ReactiveWebServerFactoryConfiguration {
ObjectProvider<NettyRouteProvider> routes, ObjectProvider<NettyServerCustomizer> serverCustomizers) {
NettyReactiveWebServerFactory serverFactory = new NettyReactiveWebServerFactory();
serverFactory.setResourceFactory(resourceFactory);
routes.orderedStream().forEach((route) -> serverFactory.addRouteProviders(route));
routes.orderedStream().forEach(serverFactory::addRouteProviders);
serverFactory.getServerCustomizers().addAll(serverCustomizers.orderedStream().collect(Collectors.toList()));
return serverFactory;
}

@ -165,9 +165,7 @@ public class FileSystemWatcher {
}
private void saveInitialSnapshots() {
for (File folder : this.folders.keySet()) {
this.folders.put(folder, new FolderSnapshot(folder));
}
this.folders.replaceAll((f, v) -> new FolderSnapshot(f));
}
/**

Loading…
Cancel
Save