Skip to content

Commit e505cee

Browse files
Remove deprecated methods/classes from rxjava-core
Cleanup on path to 1.0: ReactiveX#1001 (comment)
1 parent cd4c1ac commit e505cee

34 files changed

+57
-4414
lines changed

language-adaptors/rxjava-clojure/src/main/clojure/rx/lang/clojure/core.clj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,14 @@
292292
;################################################################################
293293
; Operators
294294

295-
(defn synchronize
296-
"Synchronize execution.
295+
(defn serialize
296+
"Serialize execution.
297297
298298
See:
299-
rx.Observable/synchronize
299+
rx.Observable/serialize
300300
"
301301
([^Observable xs]
302-
(.synchronize xs))
303-
([lock ^Observable xs]
304-
(.synchronize xs lock)))
302+
(.serialize xs)))
305303

306304
(defn merge*
307305
"Merge an Observable of Observables into a single Observable
@@ -472,10 +470,10 @@
472470
empty Observable if xs is empty.
473471
474472
See:
475-
rx.Observable/takeFirst
473+
rx.Observable/take(1)
476474
"
477475
[^Observable xs]
478-
(.takeFirst xs))
476+
(.take xs 1))
479477

480478
(defn ^Observable group-by
481479
"Returns an Observable of clojure.lang.MapEntry where the key is the result of

language-adaptors/rxjava-clojure/src/test/clojure/rx/lang/clojure/core_test.clj

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,14 @@
9696
(b/into []))]
9797
(is (= [2 4] result))))
9898

99-
(deftest test-syncrhonize
100-
; I'm going to believe synchronize works and just exercise it
99+
(deftest test-serialize
100+
; I'm going to believe serialize works and just exercise it
101101
; here for sanity.
102102
(is (= [1 2 3]
103103
(->> [1 2 3]
104104
(rx/seq->o)
105-
(rx/synchronize)
106-
(b/into []))))
107-
(let [lock (Object.)]
108-
(is (= [1 2 3]
109-
(->> [1 2 3]
110-
(rx/seq->o)
111-
(rx/synchronize lock)
112-
(b/into []))))))
105+
(rx/serialize)
106+
(b/into [])))))
113107

114108
(let [expected-result [[1 3 5] [2 4 6]]
115109
sleepy-o #(f/future-generator*

language-adaptors/rxjava-groovy/src/test/groovy/rx/lang/groovy/ObservableTests.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def class ObservableTests {
322322

323323
Observable.from("one", "two", "three", "four", "five", "six")
324324
.groupBy({String s -> s.length()})
325-
.mapMany({
325+
.flatMap({
326326
groupObservable ->
327327

328328
return groupObservable.map({

language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Observable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ trait Observable[+T]
268268
* @return an Observable that is a chronologically well-behaved version of the source
269269
* Observable, and that synchronously notifies its [[rx.lang.scala.Observer]]s
270270
*/
271-
def synchronize: Observable[T] = {
272-
toScalaObservable[T](asJavaObservable.synchronize)
271+
def serialize: Observable[T] = {
272+
toScalaObservable[T](asJavaObservable.serialize)
273273
}
274274

275275
/**

rxjava-core/src/main/java/rx/Notification.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,6 @@ private Notification(Kind kind, T value, Throwable e) {
5252
this.kind = kind;
5353
}
5454

55-
/**
56-
* A constructor used to represent an onNext notification.
57-
*
58-
* @param value
59-
* The data passed to the onNext method.
60-
*/
61-
@Deprecated
62-
public Notification(T value) {
63-
this.value = value;
64-
this.throwable = null;
65-
this.kind = Kind.OnNext;
66-
}
67-
68-
/**
69-
* A constructor used to represent an onError notification.
70-
*
71-
* @param exception
72-
* The exception passed to the onError notification.
73-
* @deprecated Because type Throwable can't disambiguate the constructors if both onNext and onError are type "Throwable"
74-
*/
75-
@Deprecated
76-
public Notification(Throwable exception) {
77-
this.throwable = exception;
78-
this.value = null;
79-
this.kind = Kind.OnError;
80-
}
81-
82-
/**
83-
* A constructor used to represent an onCompleted notification.
84-
*/
85-
@Deprecated
86-
public Notification() {
87-
this.throwable = null;
88-
this.value = null;
89-
this.kind = Kind.OnCompleted;
90-
}
91-
9255
/**
9356
* Retrieves the exception associated with an onError notification.
9457
*

0 commit comments

Comments
 (0)