Expected behavior of a Streams.cycled() instance - found issues and questions

Dmitry Bessonov dmitry.bessonov at oracle.com
Wed Oct 24 04:31:41 PDT 2012

On 24.10.2012 15:06, Dmitry Bessonov wrote:
>>> Well, I'm not sure I agree with the notion of common sense here; I 
>>> think
>>> its a bit much to ask the runtime to do this kind of analysis.  But 
>>> this
>>> is a fine example of the sort of trouble we get in when we do try and
>>> protect the user from themselves; this ISE is exactly what you're 
>>> asking
>>> for in (1), and we should probably remove it.
>> Yeah, we can only catch some not all cases so it is inconsistent.
> Well, but it is still possible to implement a special (smart) version 
> of uniqueElements() for the cycled stream instances?

I mean - not for any cycled stream but for a cycled stream instance that 
we are confident about that it's cycled - created with Streams.cycled() 


More information about the lambda-dev mailing list