Merge pull request #5283 from Doha2012/master

fix nested loop
This commit is contained in:
Loredana Crusoveanu 2018-09-19 21:25:36 +03:00 committed by GitHub
commit 6f93afcf9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -28,8 +28,9 @@ public class MainController {
public void getFilters() {
FilterChainProxy filterChainProxy = (FilterChainProxy) springSecurityFilterChain;
List<SecurityFilterChain> list = filterChainProxy.getFilterChains();
list.forEach(chain -> chain.getFilters()
.forEach(filter -> System.out.println(filter.getClass())));
list.stream()
.flatMap(chain -> chain.getFilters().stream())
.forEach(filter -> System.out.println(filter.getClass()));
}
@RequestMapping(method = RequestMethod.GET, value = "/foos/{id}")