Skip to content

lineNumber in FlatFileItemReader not threadsafe #3632

Open
@sbied

Description

@sbied

If multiple threads are configured in a step using a FlatFileItemReader, the lineNumber issued to the linemapper is compromised.

As a simple possible solution, the readline-Method must be synchronized. The lineMapper itself does not need sync.

BTW: In doc of the ItemReader the statement
" Implementations need not be thread-safe and clients of a {@link ItemReader}
need to be aware that this is the case.
"

is deeply misleading.

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