Before this commit, it was not possible to pass a null encoding
to the StaxEventItemReader, which prevents the XML event reader
to auto-detect the file encoding.
This commits makes the encoding setter more lenient by accepting
a null value.
Resolves#4101
Before this commit, state validation rules in RepositoryItemReader
were not consistent with those applied in its builder.
This commit makes validation rules consistent between the two ways
of creating a RepositoryItemReader. This commit also adds a getter
for the component name in ExecutionContextUserSupport to be able to
assert on it where appropriate down the hierarchy.
Resolves#4276
On empty input, the JdbcPagingItemReader cannot derive
a start value for the sort key to be used in further
queries. For multi-threaded steps, it is thus necessary
to prevent the reader from trying to read further pages
if the first page is empty.
Issue #3898
Due to GenericRecord being checked before SpecificRecordBase,
GenericDatumWriter was used incorrectly for types that extend
SpecificRecordBase.
Resolves#3859
Both the PatternMatcher and JdbcParameterUtils use String.toCharArray for
processing. This will create a new char[] which needs to be collected. The
same code has been rewritten to use String.charAt to reduce the overhead.
Additionally unneeded object creation in the PatternMatcher has been removed
as well, to reduce further objects needed to be gc'ed.
StringBuilder by default has a size of 16, however there
are some places that already create larger strings already.
For efficiency and garbage reduction it would be better to have
larger sizes to begin with.
Guarded the logging statements which do concatenation of strings
or calling toString on objects. When a log level isn't enabled
this still would produce garbage that would need to be collected.
Guarded all logging up to info, warn and error can be assumed to be
enabled on a production system.
Currently when reading/writing JSON and using the reader/marshaller provided
and you want a custom Gson or ObjectMapper instance it still creates the not
needed instance. Move the construction to a constructor and provide a constructor
to directly pass in the pre-configured Gson or ObjectMapper instance.
The same approach is used in Spring itself where Gson or ObjectMapper instances
can be passed in.
Tests in this class fail intermittently because
they send messages to Kafka in an asynchronous
way and assert on the results immediately without
waiting for the send operation to complete.
This commit updates the tests to wait for
send results before asserting on them
(similar to a140a9f5).
(cherry picked from commit 5826111b85)
* Corrects unit tests with expected behavior.
* Creates integration tests highlighting Hibernate lazy-loading failure if the reader has requested the page on open().
Issue #1074