Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top