OPENNLP-835 Fix early termination, reset behavior and minor memory leak

The class SequenceStreamEventStream has a few bugs.
(1) It truncates the stream early if any sequence is empty.
(2) After reset, it will emit the remaining elements from the underlying sequence that was being iterated over before the reset, and then start over from the beginning.
(3) It leaks memory by not discarding references to objects it doesn't need anymore.

Thanks to Steven Taschuk for providing a patch. 


git-svn-id: https://svn.apache.org/repos/asf/opennlp/trunk@1741161 13f79535-47bb-0310-9956-ffa450edef68
1 file changed