Simplify some code

See gh-17893
pull/17913/head
LiangYong 5 years ago committed by Stephane Nicoll
parent 7712f9c0e5
commit a5746d0a03

@ -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