Skip to content

Commit 8eac3fe

Browse files
committed
Fix SingleEntityExecution when a single element is emitted.
We now correctly exit the handler to avoid element emission followed by an error signal. Closes #1107
1 parent f684eaa commit 8eac3fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ReactiveCassandraQueryExecution.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public Publisher<? extends Object> execute(Statement<?> statement, Class<?> type
150150

151151
if (objects.size() == 1 || limiting) {
152152
sink.next(objects.get(0));
153+
return;
153154
}
154155

155156
sink.error(new IncorrectResultSizeDataAccessException(1, objects.size()));

0 commit comments

Comments
 (0)