[BATCH-2749] Property default value differs from document Created: 04/Sep/18  Updated: 17/Dec/19  Resolved: 04/Sep/18

Status: Resolved
Project: Spring Batch
Component/s: Infrastructure
Affects Version/s: 3.0.9, 4.0.1
Fix Version/s: 4.1.0, 4.0.2, 3.0.10, 4.1.0.RC1

Type: Bug Priority: Minor
Reporter: btnoharadik Assignee: Mahmoud Ben Hassine
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


The default for the StaxEventItemReader's strict property API document is false, but the default value is set to true.

  * In strict mode the reader will throw an exception on
  * {@link #open(org.springframework.batch.item.ExecutionContext)} if the input resource does not exist.
  * @param strict false by default
 public void setStrict(boolean strict) {
      this.strict = strict;
  private boolean strict = true;

Default value is true or false Which is correct?

Comment by Mahmoud Ben Hassine [ 04/Sep/18 ]

That's true, the default is true! So the javadoc needs to be updated.

Thank you for reporting this out.

Comment by Mahmoud Ben Hassine [ 04/Sep/18 ]

I also checked the StaxEventItemReaderBuilder, just in case. The javadoc is correct in regards to the default value in the builder.

Comment by Spring Issuemaster [ 17/Dec/19 ]

The Spring Batch Framework has moved from Jira to GitHub Issues. This issue was migrated to spring-projects/spring-batch#855.

Generated at Mon May 25 11:47:55 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.