문제

FunctionalJava app throws StackOverflowError with Stream in stack trace, but the app doesn't (seemingly) use stream. What could be the cause?

도움이 되었습니까?

해결책

Possibly some other datastructure is useing Stream behind the scenes, which can use massive recursion.

The suspect in my case was IterableW, when using wrap and bind on native Java Iterables. Instead that, I used fj.List.iterableList to convert a finite Iterable to a fj.List, which has effective bind operation.

다른 팁

There is a pull request to fix this on github.

If this is biting you, perhaps you could try that fix, and vote +1 on merging it if it works for you?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top