Skip to content

Commit ab7c17d

Browse files
committed
Upgrade to RxJava 2.1.1, adjust emitters
1 parent bfe4aa0 commit ab7c17d

File tree

6 files changed

+30
-9
lines changed

6 files changed

+30
-9
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RxJava 2.x implementation of extra sources, operators and components and ports o
1313

1414
```
1515
dependencies {
16-
compile "com.github.akarnokd:rxjava2-extensions:0.17.0"
16+
compile "com.github.akarnokd:rxjava2-extensions:0.17.1"
1717
}
1818
```
1919

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies {
4949
signature 'org.codehaus.mojo.signature:java16:1.1@signature'
5050

5151
compile "org.reactivestreams:reactive-streams:1.0.0"
52-
compile "io.reactivex.rxjava2:rxjava:2.1.0"
52+
compile "io.reactivex.rxjava2:rxjava:2.1.1"
5353

5454
testCompile group: 'junit', name: 'junit', version: '4.12'
5555

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.17.0
1+
version=0.17.1

src/main/java/hu/akarnokd/rxjava2/basetypes/NonoCreate.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,23 @@ public void onComplete() {
8080

8181
@Override
8282
public void onError(Throwable t) {
83+
if (!tryOnError(t)) {
84+
RxJavaPlugins.onError(t);
85+
}
86+
}
87+
88+
@Override
89+
public boolean tryOnError(Throwable t) {
8390
Disposable d = getAndSet(DisposableHelper.DISPOSED);
8491
if (d != DisposableHelper.DISPOSED) {
8592
actual.onError(t);
8693

8794
if (d != null) {
8895
d.dispose();
8996
}
90-
} else {
91-
RxJavaPlugins.onError(t);
97+
return true;
9298
}
99+
return false;
93100
}
94101

95102
@Override

src/main/java/hu/akarnokd/rxjava2/basetypes/PerhapsCreate.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,23 @@ public void onSuccess(T t) {
8181

8282
@Override
8383
public void onError(Throwable t) {
84+
if (!tryOnError(t)) {
85+
RxJavaPlugins.onError(t);
86+
}
87+
}
88+
89+
@Override
90+
public boolean tryOnError(Throwable t) {
8491
Disposable d = resource.getAndSet(DisposableHelper.DISPOSED);
8592
if (d != DisposableHelper.DISPOSED) {
8693
actual.onError(t);
8794

8895
if (d != null) {
8996
d.dispose();
9097
}
91-
} else {
92-
RxJavaPlugins.onError(t);
98+
return true;
9399
}
100+
return false;
94101
}
95102

96103
@Override

src/main/java/hu/akarnokd/rxjava2/basetypes/SoloCreate.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,23 @@ public void onSuccess(T t) {
8181

8282
@Override
8383
public void onError(Throwable t) {
84+
if (!tryOnError(t)) {
85+
RxJavaPlugins.onError(t);
86+
}
87+
}
88+
89+
@Override
90+
public boolean tryOnError(Throwable t) {
8491
Disposable d = resource.getAndSet(DisposableHelper.DISPOSED);
8592
if (d != DisposableHelper.DISPOSED) {
8693
actual.onError(t);
8794

8895
if (d != null) {
8996
d.dispose();
9097
}
91-
} else {
92-
RxJavaPlugins.onError(t);
98+
return true;
9399
}
100+
return false;
94101
}
95102

96103
@Override

0 commit comments

Comments
 (0)