If a call to `getCurrentWhatever` happens after `start` or `advance` has returned false, it's a bug in the runner, but the reader needs to be able to fail, otherwise you'll get a synthetic element that doesn't really exist. If a reader throws `NoSuchElementException` after the most recent call returned true, the reader isn't conforming to spec.
On Mon, Mar 12, 2018 at 9:00 AM Romain Manni-Bucau <rmannibu...@gmail.com> wrote: > Hi guys, > > why reader#getCurrent* can throw NoSuchElementException, > my understanding is that the runner will guarantee that start or advance > was called and returned true when calling getCurrent so this is a case > which shouldn't happen, no? > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <https://rmannibucau.metawerx.net/> | Old Blog > <http://rmannibucau.wordpress.com> | Github > <https://github.com/rmannibucau> | LinkedIn > <https://www.linkedin.com/in/rmannibucau> | Book > <https://www.packtpub.com/application-development/java-ee-8-high-performance> >