Stream reuse in superclass
brian.goetz at oracle.com
Fri Apr 5 05:44:34 PDT 2013
You are probably using side-effects in your mapper to accomplish this,
which is definitely dangerous and ill-advised.
Maybe you could zoom out and actually tell people what problem you are
trying to solve? There is almost certainly a better solution here.
On 4/5/2013 8:07 AM, Jose wrote:
> The method
> doSomethingWith(Stream<T> s)
> was using a forEach() that consumed the stream.
> Replacing it with a map() did the trick.
> Thanks, I like the solution.
More information about the lambda-dev