NPE when creating MongoItemReader using a builder without specifying sorting #4082
Labels
for: backport-to-4.3.x
Issues that will be back-ported to the 4.3.x line
in: infrastructure
type: bug
Milestone
Bug description
When creating an instance of
MongoItemReader
usingMongoItemReaderBuilder
and no sorting is set, using the ItemReader results in NPEEnvironment
Using dependency
spring-boot-starter-batch
, version2.4.5
Steps to reproduce
Expected behavior
When no sorting is provided, either default sorting should be used, or it should be validated, that sorting is set in
MongoItemReaderBuilder#build()
method. There is a validation when using queryString, but no one when using aQuery
objectMinimal Complete Reproducible example
See Steps to reproduce
The text was updated successfully, but these errors were encountered: