Skip to content

Commit 278b08c

Browse files
committed
Drop support for RxJava 2.
Closes #2469
1 parent aa02167 commit 278b08c

12 files changed

+14
-545
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

-200
This file was deleted.

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

-43
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;
@@ -67,14 +65,6 @@ public abstract class ReactiveWrapperConverters {
6765

6866
static {
6967

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-
7868
if (ReactiveWrappers.isAvailable(ReactiveLibrary.RXJAVA3)) {
7969

8070
REACTIVE_WRAPPERS.add(RxJava3SingleWrapper.INSTANCE);
@@ -325,82 +315,6 @@ public Publisher<?> map(Object wrapper, Function<Object, Object> function) {
325315
}
326316
}
327317

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-
404318
// -------------------------------------------------------------------------
405319
// RxJava 3 converters
406320
// -------------------------------------------------------------------------

0 commit comments

Comments
 (0)