|
15 | 15 | */
|
16 | 16 | package org.springframework.data.repository.util;
|
17 | 17 |
|
18 |
| -import io.reactivex.Flowable; |
19 |
| -import io.reactivex.Maybe; |
20 | 18 | import kotlinx.coroutines.flow.Flow;
|
21 | 19 | import kotlinx.coroutines.flow.FlowKt;
|
22 | 20 | import kotlinx.coroutines.reactive.ReactiveFlowKt;
|
@@ -67,14 +65,6 @@ public abstract class ReactiveWrapperConverters {
|
67 | 65 |
|
68 | 66 | static {
|
69 | 67 |
|
70 |
| - if (ReactiveWrappers.isAvailable(ReactiveLibrary.RXJAVA2)) { |
71 |
| - |
72 |
| - REACTIVE_WRAPPERS.add(RxJava2SingleWrapper.INSTANCE); |
73 |
| - REACTIVE_WRAPPERS.add(RxJava2MaybeWrapper.INSTANCE); |
74 |
| - REACTIVE_WRAPPERS.add(RxJava2ObservableWrapper.INSTANCE); |
75 |
| - REACTIVE_WRAPPERS.add(RxJava2FlowableWrapper.INSTANCE); |
76 |
| - } |
77 |
| - |
78 | 68 | if (ReactiveWrappers.isAvailable(ReactiveLibrary.RXJAVA3)) {
|
79 | 69 |
|
80 | 70 | REACTIVE_WRAPPERS.add(RxJava3SingleWrapper.INSTANCE);
|
@@ -325,82 +315,6 @@ public Publisher<?> map(Object wrapper, Function<Object, Object> function) {
|
325 | 315 | }
|
326 | 316 | }
|
327 | 317 |
|
328 |
| - // ------------------------------------------------------------------------- |
329 |
| - // RxJava 2 converters |
330 |
| - // ------------------------------------------------------------------------- |
331 |
| - |
332 |
| - /** |
333 |
| - * Wrapper for RxJava 2's {@link io.reactivex.Single}. |
334 |
| - */ |
335 |
| - private enum RxJava2SingleWrapper implements ReactiveTypeWrapper<io.reactivex.Single<?>> { |
336 |
| - |
337 |
| - INSTANCE; |
338 |
| - |
339 |
| - @Override |
340 |
| - public Class<? super io.reactivex.Single<?>> getWrapperClass() { |
341 |
| - return io.reactivex.Single.class; |
342 |
| - } |
343 |
| - |
344 |
| - @Override |
345 |
| - public io.reactivex.Single<?> map(Object wrapper, Function<Object, Object> function) { |
346 |
| - return ((io.reactivex.Single<?>) wrapper).map(function::apply); |
347 |
| - } |
348 |
| - } |
349 |
| - |
350 |
| - /** |
351 |
| - * Wrapper for RxJava 2's {@link io.reactivex.Maybe}. |
352 |
| - */ |
353 |
| - private enum RxJava2MaybeWrapper implements ReactiveTypeWrapper<Maybe<?>> { |
354 |
| - |
355 |
| - INSTANCE; |
356 |
| - |
357 |
| - @Override |
358 |
| - public Class<? super io.reactivex.Maybe<?>> getWrapperClass() { |
359 |
| - return io.reactivex.Maybe.class; |
360 |
| - } |
361 |
| - |
362 |
| - @Override |
363 |
| - public io.reactivex.Maybe<?> map(Object wrapper, Function<Object, Object> function) { |
364 |
| - return ((io.reactivex.Maybe<?>) wrapper).map(function::apply); |
365 |
| - } |
366 |
| - } |
367 |
| - |
368 |
| - /** |
369 |
| - * Wrapper for RxJava 2's {@link io.reactivex.Observable}. |
370 |
| - */ |
371 |
| - private enum RxJava2ObservableWrapper implements ReactiveTypeWrapper<io.reactivex.Observable<?>> { |
372 |
| - |
373 |
| - INSTANCE; |
374 |
| - |
375 |
| - @Override |
376 |
| - public Class<? super io.reactivex.Observable<?>> getWrapperClass() { |
377 |
| - return io.reactivex.Observable.class; |
378 |
| - } |
379 |
| - |
380 |
| - @Override |
381 |
| - public io.reactivex.Observable<?> map(Object wrapper, Function<Object, Object> function) { |
382 |
| - return ((io.reactivex.Observable<?>) wrapper).map(function::apply); |
383 |
| - } |
384 |
| - } |
385 |
| - |
386 |
| - /** |
387 |
| - * Wrapper for RxJava 2's {@link io.reactivex.Flowable}. |
388 |
| - */ |
389 |
| - private enum RxJava2FlowableWrapper implements ReactiveTypeWrapper<Flowable<?>> { |
390 |
| - |
391 |
| - INSTANCE; |
392 |
| - |
393 |
| - @Override |
394 |
| - public Class<? super Flowable<?>> getWrapperClass() { |
395 |
| - return io.reactivex.Flowable.class; |
396 |
| - } |
397 |
| - |
398 |
| - @Override |
399 |
| - public io.reactivex.Flowable<?> map(Object wrapper, Function<Object, Object> function) { |
400 |
| - return ((io.reactivex.Flowable<?>) wrapper).map(function::apply); |
401 |
| - } |
402 |
| - } |
403 |
| - |
404 | 318 | // -------------------------------------------------------------------------
|
405 | 319 | // RxJava 3 converters
|
406 | 320 | // -------------------------------------------------------------------------
|
|
0 commit comments