DATACASS-686 - Adapt to changes in Spring Framework's ClassUtils.isPrimitiveOrWrapper.

Switch processing order to suppress element emission for query methods declaring Mono<Void> or Flux<Void>.
This commit is contained in:
Mark Paluch
2019-09-04 12:19:04 +02:00
parent 728fce6331
commit 30fcc2afac

View File

@@ -220,11 +220,8 @@ interface ReactiveCassandraQueryExecution {
ReturnedType returnedType = processor.getReturnedType();
if (ClassUtils.isPrimitiveOrWrapper(returnedType.getReturnedType())) {
return source;
}
if (returnedType.getReturnedType().equals(Void.class)) {
if (source instanceof Mono) {
return ((Mono<?>) source).then();
}
@@ -234,6 +231,10 @@ interface ReactiveCassandraQueryExecution {
}
}
if (ClassUtils.isPrimitiveOrWrapper(returnedType.getReturnedType())) {
return source;
}
if (returnedType.isInstance(source)) {
return source;
}