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
This commit is contained in:
Mark Paluch
2021-03-22 11:38:41 +01:00
parent f684eaac7a
commit 8eac3fed03

View File

@@ -150,6 +150,7 @@ interface ReactiveCassandraQueryExecution {
if (objects.size() == 1 || limiting) {
sink.next(objects.get(0));
return;
}
sink.error(new IncorrectResultSizeDataAccessException(1, objects.size()));