Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

CloseableIterator "kind of" breaks Iterator interface contract #2

Open
danbim opened this issue Feb 27, 2015 · 0 comments
Open

CloseableIterator "kind of" breaks Iterator interface contract #2

danbim opened this issue Feb 27, 2015 · 0 comments
Milestone

Comments

@danbim
Copy link
Member

danbim commented Feb 27, 2015

As Java heavily relies on iterators (e.g., simplified for-loop) it will usually never care about the fact that the EventStore iterators would have to be closed. Also users of the event store typically don't expect this kind of behavior. If possible the iterator returned by the event store should "close itself", i.e.,

  • close automatically if end has been reached (hasNext() == false) and
  • close itself automatically if not used anymore (should be possible when GC calls finalize())
@danbim danbim added this to the 1.0 milestone Feb 27, 2015
@danbim danbim changed the title CloseableIterator "kind of" break Iterator interface contract CloseableIterator "kind of" breaks Iterator interface contract Feb 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant