[BATCH-2749] Property default value differs from document Created: 04/Sep/18  Updated: 04/Sep/18  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.

Generated at Sun Nov 17 20:38:21 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.