Skip to content

Commit d52bdd3

Browse files
Version 0.12.0 Changes
1 parent 3113e88 commit d52bdd3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

CHANGES.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
### Version 0.12.0 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.netflix.rxjava%22%20AND%20v%3A%220.12.0%22)) ###
44

5+
This version adds to the static typing changes in 0.11 and adds covariant/contravariant typing via super/extends generics.
6+
7+
Additional cleanup was done, particularly related to `BlockingObservable`. Also the `window` operator was added.
8+
9+
The largest breaking change is that `Observable.create` now accepts an `OnSubscribeFunc` rather than a `Func1`.
10+
11+
This means that instead of this:
12+
13+
```java
14+
public static <T> Observable<T> create(Func1<? super Observer<? super T>, ? extends Subscription> func)
15+
```
16+
17+
it is now:
18+
19+
```java
20+
public static <T> Observable<T> create(OnSubscribeFunc<T> func)
21+
```
22+
23+
This was done to simplify the usage of `Observable.create` which was already verbose but made far worse by the `? super` generics.
24+
25+
For example, instead of writing this:
26+
27+
```java
28+
Observable.create(new Func1<Observer<? super SomeType>, Subscription>() {
29+
/// body here
30+
}
31+
```
32+
33+
it is now written as:
34+
35+
```java
36+
Observable.create(new OnSubscribeFunc<SomeType>() {
37+
/// body here
38+
}
39+
```
40+
541
* [Pull 343](https://github.com/Netflix/RxJava/pull/343) Covariant Support with super/extends and `OnSubscribeFunc` as type for `Observable.create`
642
* [Pull 337](https://github.com/Netflix/RxJava/pull/337) Operator: `window`
743
* [Pull 348](https://github.com/Netflix/RxJava/pull/348) Rename `switchDo` to `switchOnNext` (deprecate `switchDo` for eventual deletion)

0 commit comments

Comments
 (0)