Skip to content

Commit 65ce08f

Browse files
committed
Drop support for RxJava 2.
Closes #2469
1 parent fbb073b commit 65ce08f

12 files changed

+14
-554
lines changed

Diff for: pom.xml

-7
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@
112112

113113
<!-- RxJava -->
114114

115-
<dependency>
116-
<groupId>io.reactivex.rxjava2</groupId>
117-
<artifactId>rxjava</artifactId>
118-
<version>${rxjava2}</version>
119-
<optional>true</optional>
120-
</dependency>
121-
122115
<dependency>
123116
<groupId>io.reactivex.rxjava3</groupId>
124117
<artifactId>rxjava</artifactId>

Diff for: src/main/java/org/springframework/data/repository/reactive/RxJava2CrudRepository.java

-202
This file was deleted.

Diff for: src/main/java/org/springframework/data/repository/reactive/RxJava2SortingRepository.java

-45
This file was deleted.

Diff for: src/main/java/org/springframework/data/repository/reactive/RxJava3SortingRepository.java

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* @since 2.4
2929
* @see Sort
3030
* @see Flowable
31-
* @see RxJava2CrudRepository
3231
*/
3332
@NoRepositoryBean
3433
public interface RxJava3SortingRepository<T, ID> extends RxJava3CrudRepository<T, ID> {

Diff for: src/main/java/org/springframework/data/repository/util/ReactiveWrapperConverters.java

-86
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package org.springframework.data.repository.util;
1717

18-
import io.reactivex.Flowable;
19-
import io.reactivex.Maybe;
2018
import kotlinx.coroutines.flow.Flow;
2119
import kotlinx.coroutines.flow.FlowKt;
2220
import kotlinx.coroutines.reactive.ReactiveFlowKt;
@@ -68,14 +66,6 @@ public abstract class ReactiveWrapperConverters {
6866

6967
static {
7068

71-
if (ReactiveWrappers.isAvailable(ReactiveLibrary.RXJAVA2)) {
72-
73-
REACTIVE_WRAPPERS.add(RxJava2SingleWrapper.INSTANCE);
74-
REACTIVE_WRAPPERS.add(RxJava2MaybeWrapper.INSTANCE);
75-
REACTIVE_WRAPPERS.add(RxJava2ObservableWrapper.INSTANCE);
76-
REACTIVE_WRAPPERS.add(RxJava2FlowableWrapper.INSTANCE);
77-
}
78-
7969
if (ReactiveWrappers.isAvailable(ReactiveLibrary.RXJAVA3)) {
8070

8171
REACTIVE_WRAPPERS.add(RxJava3SingleWrapper.INSTANCE);
@@ -331,82 +321,6 @@ public Publisher<?> map(Object wrapper, Function<Object, Object> function) {
331321
}
332322
}
333323

334-
// -------------------------------------------------------------------------
335-
// RxJava 2 converters
336-
// -------------------------------------------------------------------------
337-
338-
/**
339-
* Wrapper for RxJava 2's {@link io.reactivex.Single}.
340-
*/
341-
private enum RxJava2SingleWrapper implements ReactiveTypeWrapper<io.reactivex.Single<?>> {
342-
343-
INSTANCE;
344-
345-
@Override
346-
public Class<? super io.reactivex.Single<?>> getWrapperClass() {
347-
return io.reactivex.Single.class;
348-
}
349-
350-
@Override
351-
public io.reactivex.Single<?> map(Object wrapper, Function<Object, Object> function) {
352-
return ((io.reactivex.Single<?>) wrapper).map(function::apply);
353-
}
354-
}
355-
356-
/**
357-
* Wrapper for RxJava 2's {@link io.reactivex.Maybe}.
358-
*/
359-
private enum RxJava2MaybeWrapper implements ReactiveTypeWrapper<Maybe<?>> {
360-
361-
INSTANCE;
362-
363-
@Override
364-
public Class<? super io.reactivex.Maybe<?>> getWrapperClass() {
365-
return io.reactivex.Maybe.class;
366-
}
367-
368-
@Override
369-
public io.reactivex.Maybe<?> map(Object wrapper, Function<Object, Object> function) {
370-
return ((io.reactivex.Maybe<?>) wrapper).map(function::apply);
371-
}
372-
}
373-
374-
/**
375-
* Wrapper for RxJava 2's {@link io.reactivex.Observable}.
376-
*/
377-
private enum RxJava2ObservableWrapper implements ReactiveTypeWrapper<io.reactivex.Observable<?>> {
378-
379-
INSTANCE;
380-
381-
@Override
382-
public Class<? super io.reactivex.Observable<?>> getWrapperClass() {
383-
return io.reactivex.Observable.class;
384-
}
385-
386-
@Override
387-
public io.reactivex.Observable<?> map(Object wrapper, Function<Object, Object> function) {
388-
return ((io.reactivex.Observable<?>) wrapper).map(function::apply);
389-
}
390-
}
391-
392-
/**
393-
* Wrapper for RxJava 2's {@link io.reactivex.Flowable}.
394-
*/
395-
private enum RxJava2FlowableWrapper implements ReactiveTypeWrapper<Flowable<?>> {
396-
397-
INSTANCE;
398-
399-
@Override
400-
public Class<? super Flowable<?>> getWrapperClass() {
401-
return io.reactivex.Flowable.class;
402-
}
403-
404-
@Override
405-
public io.reactivex.Flowable<?> map(Object wrapper, Function<Object, Object> function) {
406-
return ((io.reactivex.Flowable<?>) wrapper).map(function::apply);
407-
}
408-
}
409-
410324
// -------------------------------------------------------------------------
411325
// RxJava 3 converters
412326
// -------------------------------------------------------------------------

0 commit comments

Comments
 (0)