Skip to content

Commit 685e211

Browse files
committed
Merge pull request #2 from samuelgruetter/RxJavaBugFixesSam2
release notes details
2 parents ea43e6d + 405d78d commit 685e211

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

language-adaptors/rxjava-scala/ReleaseNotes.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait Observer[-T] {
2121
def onCompleted(): Unit
2222
}
2323

24-
object Observer {}
24+
object Observer {...}
2525
```
2626

2727
To create an instance of say `Observer[String]` in user code, you can create a new instance of the `Observer` trait
@@ -41,7 +41,7 @@ Note that typically you do not need to create an `Observer` since all of the met
4141
`onNext`, `onError`, and `onCompleted` and will automatically create an `Observer` for you under the covers.
4242

4343
While *technically* it is a breaking change make the `asJavaObserver` property
44-
private, you should probably not have touched `asjavaObserver` in the first place.
44+
private, you should probably not have touched `asJavaObserver` in the first place.
4545

4646
Observable
4747
----------
@@ -104,14 +104,14 @@ Schedulers
104104

105105
The biggest breaking change compared to the 0.15.1 release is giving `Scheduler` the same structure as the other types.
106106
The trait itself remains unchanged, except that we made the underlying Java representation hidden as above.
107-
The scheduler package has been renamed from `rx.lang.scala.schedulers` to `rx.lang.scala.schedulers`.
107+
The scheduler package has been renamed from `rx.lang.scala.concurrency` to `rx.lang.scala.schedulers`.
108108

109109
```scala
110110
trait Scheduler {
111111
private[scala] def asJavaScheduler: rx.Scheduler;
112112
}
113113

114-
private [scala] object Scheduler {}
114+
private [scala] object Scheduler {...}
115115
```
116116

117117
In the previous release, you created schedulers by selecting them from the `Schedulers` object,
@@ -165,28 +165,28 @@ object Subscription {...}
165165
* `MultipleAssignmentSubscription`
166166
* `SerialSubscription`
167167

168-
In case you do feel tempted to call `new Subscription{ ...}` directly make sure you wire up `isUnsubscribed`
168+
In case you do feel tempted to call `new Subscription{...}` directly make sure you wire up `isUnsubscribed`
169169
and with the `unsubscribed` field properly, but for all practical purposes you should just use one of the factory methods.
170170

171171
Notifications
172172
-------------
173173

174174
All underlying wrapped `Java` types in the `Notification` trait are made private like all previous types. The companion
175-
`Notification` now has both constructor and destructor functions:
175+
objects of `Notification` now have both constructor (`apply`) and extractor (`unapply`) functions:
176176

177177
```scala
178-
object Notification {}
178+
object Notification {...}
179179
trait Notification[+T] {
180180
private [scala] def asJavaNotification: rx.Notification[_ <: T]
181181
}
182182

183183
object Notification {
184-
object OnNext { def apply(...){}; def unapply(..){...} }
185-
object OnError { def apply(...){}; def unapply(..){...} }
186-
object OnCompleted { def apply(...){}; def unapply(..){...} }
184+
object OnNext { def apply(...){}; def unapply(...){...} }
185+
object OnError { def apply(...){}; def unapply(...){...} }
186+
object OnCompleted { def apply(...){}; def unapply(...){...} }
187187
}
188188
```
189-
To construct a `Notification`, you use `Notification.OnNext("hello")`, or `Notification.OnError`(new Exception("Oops!"))`.
189+
To construct a `Notification`, you import `rx.lang.scala.Notification._` and use `OnNext("hello")`, or `OnError(new Exception("Oops!"))`, or `OnCompleted()`.
190190
To pattern match on a notification you can create a partial function like so: `case OnNext(v) => { ... v ... }`.
191191

192192
There are no breaking changes for notifications.

0 commit comments

Comments
 (0)