flux = flux.map(applyValidationIfApplicable(bodyParameter));
}
return Mono.just(adapter.fromPublisher(flux));
}
else {
<BUG>Mono<?> mono = reader.readMono(elementType, request, hints)
.otherwise(ex -> Mono.error(getReadError(ex, bodyParameter)));
</BUG>
if (checkRequired(adapter, isBodyRequired)) {
mono = mono.otherwiseIfEmpty(Mono.error(getRequiredBodyError(bodyParameter)));

flux = flux.map(applyValidationIfApplicable(bodyParameter));
}
return Mono.just(adapter.fromPublisher(flux));
}
else {
Mono<?> mono = (reader instanceof ServerHttpMessageReader ?
((ServerHttpMessageReader<?>)reader).readMono(bodyType, elementType,
request, response, Collections.emptyMap()) :
reader.readMono(elementType, request, Collections.emptyMap())
.otherwise(ex -> Mono.error(getReadError(ex, bodyParameter))));
if (checkRequired(adapter, isBodyRequired)) {
mono = mono.otherwiseIfEmpty(Mono.error(getRequiredBodyError(bodyParameter)));
