Skip to content

Default value for ignoreWarnings in JdbcCursorItemReaderBuilder does not align with documentation #4570

Closed
@fabiomolignoni

Description

@fabiomolignoni

Bug description
The class JdbcCursorItemReaderBuilder does not set a default value for the boolean property ignoreWarnings. Consequently, ignoreWarnings implicitly defaults to false. When the method build() is invoked, the value false is assigned to the JdbcCursorItemReader's ignoreWarnings variable.

This behavior deviates from the expected one as described in the Spring Batch Database documentation, which states:

ignoreWarnings: Determines whether or not SQLWarnings are logged or cause an exception. The default is true (meaning that warnings are logged).

The proposed solution is to set the default value of ignoreWarnings to true. This adjustment ensures that if the parameter is not explicitly set, warnings will be only logged, aligning with the documented behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions