DATACMNS-1795 - Align checks in ReactiveWrappers with checks in ReactiveAdapterRegistry.

Checks in ReactiveWrappers align now with checks in ReactiveAdapterRegistry for a consistent configuration experience.
This commit is contained in:
Mark Paluch
2020-09-10 10:35:13 +02:00
parent 88562e8dfc
commit fb66f5c275

View File

@@ -59,19 +59,19 @@ import org.springframework.util.ClassUtils;
@UtilityClass
public class ReactiveWrappers {
private static final boolean PROJECT_REACTOR_PRESENT = ClassUtils.isPresent("reactor.core.publisher.Mono",
private static final boolean PROJECT_REACTOR_PRESENT = ClassUtils.isPresent("reactor.core.publisher.Flux",
ReactiveWrappers.class.getClassLoader());
private static final boolean RXJAVA1_PRESENT = ClassUtils.isPresent("rx.Completable",
private static final boolean RXJAVA1_PRESENT = ClassUtils.isPresent("rx.Observable",
ReactiveWrappers.class.getClassLoader())
&& ClassUtils.isPresent("rx.RxReactiveStreams",
ReactiveWrappers.class.getClassLoader());
private static final boolean RXJAVA2_PRESENT = ClassUtils.isPresent("io.reactivex.Flowable",
ReactiveWrappers.class.getClassLoader());
private static final boolean KOTLIN_COROUTINES_PRESENT = ClassUtils.isPresent("kotlinx.coroutines.flow.Flow",
ReactiveWrappers.class.getClassLoader())
&& ClassUtils.isPresent("kotlinx.coroutines.reactive.ReactiveFlowKt", ReactiveWrappers.class.getClassLoader())
&& ClassUtils.isPresent("kotlinx.coroutines.reactor.ReactorFlowKt", ReactiveWrappers.class.getClassLoader());
private static final boolean KOTLIN_COROUTINES_PRESENT = ClassUtils.isPresent("kotlinx.coroutines.reactor.MonoKt",
ReactiveWrappers.class.getClassLoader());
/**
* Enumeration of supported reactive libraries.