File tree 5 files changed +9
-9
lines changed
src/main/java/io/reactivex/internal/operators
5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public void onComplete() {
74
74
@ Override
75
75
public void onError (Throwable t ) {
76
76
if (t == null ) {
77
- t = new NullPointerException ();
77
+ t = new NullPointerException ("Emitter got a null throwable. Null values are generally not allowed in 2.x operators and sources." );
78
78
}
79
79
if (get () != DisposableHelper .DISPOSED ) {
80
80
Disposable d = getAndSet (DisposableHelper .DISPOSED );
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public void onNext(T t) {
107
107
return ;
108
108
}
109
109
if (t == null ) {
110
- onError (new NullPointerException ("t is null" ));
110
+ onError (new NullPointerException ("Emitter got a null value. Null values are generally not allowed in 2.x operators and sources. " ));
111
111
return ;
112
112
}
113
113
if (get () == 0 && compareAndSet (0 , 1 )) {
@@ -134,7 +134,7 @@ public void onError(Throwable t) {
134
134
return ;
135
135
}
136
136
if (t == null ) {
137
- t = new NullPointerException ("t is null" );
137
+ t = new NullPointerException ("Emitter got a null throwable. Null values are generally not allowed in 2.x operators and sources. " );
138
138
}
139
139
if (error .addThrowable (t )) {
140
140
done = true ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void onSuccess(T value) {
69
69
if (d != DisposableHelper .DISPOSED ) {
70
70
try {
71
71
if (value == null ) {
72
- actual .onError (new NullPointerException ());
72
+ actual .onError (new NullPointerException ("Emitter got a null value. Null values are generally not allowed in 2.x operators and sources." ));
73
73
} else {
74
74
actual .onSuccess (value );
75
75
}
@@ -85,7 +85,7 @@ public void onSuccess(T value) {
85
85
@ Override
86
86
public void onError (Throwable t ) {
87
87
if (t == null ) {
88
- t = new NullPointerException ();
88
+ t = new NullPointerException ("Emitter got a null throwable. Null values are generally not allowed in 2.x operators and sources." );
89
89
}
90
90
if (get () != DisposableHelper .DISPOSED ) {
91
91
Disposable d = getAndSet (DisposableHelper .DISPOSED );
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ static final class CreateEmitter<T>
60
60
@ Override
61
61
public void onNext (T t ) {
62
62
if (t == null ) {
63
- onError (new NullPointerException ());
63
+ onError (new NullPointerException ("Emitter got a null value. Null values are generally not allowed in 2.x operators and sources." ));
64
64
}
65
65
if (!isDisposed ()) {
66
66
observer .onNext (t );
@@ -70,7 +70,7 @@ public void onNext(T t) {
70
70
@ Override
71
71
public void onError (Throwable t ) {
72
72
if (t == null ) {
73
- t = new NullPointerException ();
73
+ t = new NullPointerException ("Emitter got a null throwable. Null values are generally not allowed in 2.x operators and sources." );
74
74
}
75
75
if (!isDisposed ()) {
76
76
try {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public void onSuccess(T value) {
63
63
if (d != DisposableHelper .DISPOSED ) {
64
64
try {
65
65
if (value == null ) {
66
- actual .onError (new NullPointerException ());
66
+ actual .onError (new NullPointerException ("Emitter got a null value. Null values are generally not allowed in 2.x operators and sources." ));
67
67
} else {
68
68
actual .onSuccess (value );
69
69
}
@@ -79,7 +79,7 @@ public void onSuccess(T value) {
79
79
@ Override
80
80
public void onError (Throwable t ) {
81
81
if (t == null ) {
82
- t = new NullPointerException ();
82
+ t = new NullPointerException ("Emitter got a null throwable. Null values are generally not allowed in 2.x operators and sources." );
83
83
}
84
84
if (get () != DisposableHelper .DISPOSED ) {
85
85
Disposable d = getAndSet (DisposableHelper .DISPOSED );
You can’t perform that action at this time.
0 commit comments