When a tasklet is declared with xml using the shortcut version, the
MethodInvokingTaskletAdapter that is created automatically does not
address passing parameters expected by Tasklet#execute (which is
incorrect since the documentation of the schema attribute "method"
says the bean should define a method with the same signature).
This commit fixes parameters passing when using the shortcut version.
Resolves BATCH-2397
Spring 4 requires JDK 6 which includes JAXP 1.4. In Spring 4
`org.springframework.util.xml.StaxUtils` is public and directly
delegates to `javax.xml.transform.stax.StAXSource`. This means that
`org.springframework.batch.item.xml.StaxUtils#hasSpring30StaxSupport`
will always be true. Therefore a lot of code an be simplified by
calling the constructors directly instead of through reflection.
- remove reflection no longer needed in Spring 4
- move methods only used in tests to custom test class
Issue: BATCH-2417
DelimitedLineTokenizer was refactored to improve its performance but its behavior was also slightly changed.
When the input is an empty csv string with double quotes, e.g. the java
String line = "\"\""; the tokenizer returns the same String, whereas
before it was returning an empty string.
This is due to the condition checking for quotes to remove not stripping
the double quotes from the empty csv string (because its length is 2 and
the code check for strictly greater than 2).
The previous code is there 973fe44d6c/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DelimitedLineTokenizer.java (L202) and checking for
double quotes at the start and end of the string without special
handling for the empty string.
At test is also added to ensure this won't break again.
Resolves BATCH-2657
Add support for DB2AS400 to DefaultDataFieldMaxValueIncrementerFactory.
Apparently, DB2AS400 is using the same syntax for sequence value
retrieval as standard DB2.
resolves BATCH-2525
This commit adds a new `ItemProcessor` that delegates to a
`java.util.function.Function`. It also enables users to configure a
`Function` as an `ItemProcessor` via the builders (so they don't need to
worry about the `ItemProcessor` wrapper in the first place).
Resolves BATCH-2641
MultiResourceItemWriter delegating to a StaxEventItemWriter doesn't restart properly.
* Changed the open() method in MultiResourceItemWriter by setting the flag 'opened' to true.
Updated PR with code review comments.