dweiss commented on PR #15823: URL: https://github.com/apache/lucene/pull/15823#issuecomment-4142291290
I would go for an exception. If there is a limit needed somewhere, it should be added in the calling code. An internal .limit call is most likely going to obscure a problem elsewhere. Streams may be infinite - that's why they don't expose their size. Like Uwe said, their spliterators may have "sized" characteristics but in general there is no way to acquire size from a stream (the name is accurate here). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
