File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed
src/main/java/io/reactivex/rxjava3 Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change @@ -14692,7 +14692,7 @@ public final Flowable<T> toFlowable(@NonNull BackpressureStrategy strategy) {
14692
14692
@SchedulerSupport(SchedulerSupport.NONE)
14693
14693
@NonNull
14694
14694
public final Single<@NonNull List<T>> toSortedList() {
14695
- return toSortedList(Functions.naturalOrder ());
14695
+ return toSortedList(Functions.naturalComparator ());
14696
14696
}
14697
14697
14698
14698
/**
@@ -14786,7 +14786,7 @@ public final Flowable<T> toFlowable(@NonNull BackpressureStrategy strategy) {
14786
14786
@SchedulerSupport(SchedulerSupport.NONE)
14787
14787
@NonNull
14788
14788
public final Single<@NonNull List<T>> toSortedList(int capacityHint) {
14789
- return toSortedList(Functions.naturalOrder (), capacityHint);
14789
+ return toSortedList(Functions.naturalComparator (), capacityHint);
14790
14790
}
14791
14791
14792
14792
/**
Original file line number Diff line number Diff line change @@ -124,8 +124,6 @@ public static <T> Consumer<T> emptyConsumer() {
124
124
125
125
static final Supplier <Object > NULL_SUPPLIER = new NullProvider ();
126
126
127
- static final Comparator <Object > NATURAL_COMPARATOR = new NaturalObjectComparator ();
128
-
129
127
@ SuppressWarnings ("unchecked" )
130
128
@ NonNull
131
129
public static <T > Predicate <T > alwaysTrue () {
@@ -144,17 +142,6 @@ public static <T> Supplier<T> nullSupplier() {
144
142
return (Supplier <T >)NULL_SUPPLIER ;
145
143
}
146
144
147
- /**
148
- * Returns a natural order comparator which casts the parameters to Comparable.
149
- * @param <T> the value type
150
- * @return a natural order comparator which casts the parameters to Comparable
151
- */
152
- @ SuppressWarnings ("unchecked" )
153
- @ NonNull
154
- public static <T > Comparator <T > naturalOrder () {
155
- return (Comparator <T >)NATURAL_COMPARATOR ;
156
- }
157
-
158
145
static final class FutureAction implements Action {
159
146
final Future <?> future ;
160
147
@@ -767,14 +754,6 @@ public Object get() {
767
754
}
768
755
}
769
756
770
- static final class NaturalObjectComparator implements Comparator <Object > {
771
- @ SuppressWarnings ({ "unchecked" , "rawtypes" })
772
- @ Override
773
- public int compare (Object a , Object b ) {
774
- return ((Comparable )a ).compareTo (b );
775
- }
776
- }
777
-
778
757
static final class MaxRequestSubscription implements Consumer <Subscription > {
779
758
@ Override
780
759
public void accept (Subscription t ) {
You can’t perform that action at this time.
0 commit comments