You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/builder/MongoCursorItemReaderBuilder.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,7 @@ public MongoCursorItemReader<T> build() {
280
280
Assert.notNull(this.targetType, "targetType is required.");
281
281
Assert.state(StringUtils.hasText(this.jsonQuery) || this.query != null, "A query is required");
282
282
283
-
if (StringUtils.hasText(this.jsonQuery) ||this.query!= null) {
283
+
if (StringUtils.hasText(this.jsonQuery) &&this.query== null) {
284
284
Assert.notNull(this.sorts, "sorts map is required.");
285
285
}
286
286
@@ -297,7 +297,9 @@ public MongoCursorItemReader<T> build() {
Copy file name to clipboardExpand all lines: spring-batch-infrastructure/src/test/java/org/springframework/batch/item/data/builder/MongoCursorItemReaderBuilderTests.java
0 commit comments