Replace `stream()` usage with `for` loops. See [spring-security#7154](https://github.com/spring-projects/spring-security/issues/7154)