uschindler commented on PR #15823:
URL: https://github.com/apache/lucene/pull/15823#issuecomment-4150556349

   That's not working with streams. If it works it is an implementation detail 
and could break with different types of streams.
   After the exception the stream is by definition no longer useable. I have to 
lookup the spec. The correct reuse case would be if addAll would return the 
number of added entries.
   
   Then one could redo the add with a new stream using `stream.skip(return 
value)`. In that case it should not throw exception. It is all not easy to 
decide. For now I think the current impl is fine if we add enough documentation.
   
   I figured out that `add()` also throws AIOOBE. Maybe we should keep the 
exception; I would remove the catch block and only keep the `finally` intact.
   
   Uwe


-- 
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]

Reply via email to