Skip to content

SingleItemPeekableItemReader repeated peek issue with reader exceptions [BATCH-2370] #1234

Open
@spring-projects-issues

Description

@spring-projects-issues

Tommy opened BATCH-2370 and commented

The SingleItemPeekableItemReader behaves unexpectedly on repeated peek operation, if the underlying reader threw an exception. Repeated peek operation moves the record pointer by invoking read on the delegate, because no valid next item could be stored previously.

Probably it would be reasonable to additionally store the exception in peek, and emmit it over and over, as long no read operation will be invoked.
The reader should also respect such previously stored exception and emmit it if set by the read-ahead peek operation.


Affects: 3.0.3

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions