Skip to content

Commit 349c11e

Browse files
Rename exception to throwable to be clear
1 parent 97fafb0 commit 349c11e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public class Notification<T> {
2424

2525
private final Kind kind;
26-
private final Throwable exception;
26+
private final Throwable throwable;
2727
private final T value;
2828

2929
/**
@@ -34,7 +34,7 @@ public class Notification<T> {
3434
*/
3535
public Notification(T value) {
3636
this.value = value;
37-
this.exception = null;
37+
this.throwable = null;
3838
this.kind = Kind.OnNext;
3939
}
4040

@@ -45,7 +45,7 @@ public Notification(T value) {
4545
* The exception passed to the onError notification.
4646
*/
4747
public Notification(Throwable exception) {
48-
this.exception = exception;
48+
this.throwable = exception;
4949
this.value = null;
5050
this.kind = Kind.OnError;
5151
}
@@ -54,7 +54,7 @@ public Notification(Throwable exception) {
5454
* A constructor used to represent an onCompleted notification.
5555
*/
5656
public Notification() {
57-
this.exception = null;
57+
this.throwable = null;
5858
this.value = null;
5959
this.kind = Kind.OnCompleted;
6060
}
@@ -65,7 +65,7 @@ public Notification() {
6565
* @return Throwable associated with an onError notification.
6666
*/
6767
public Throwable getThrowable() {
68-
return exception;
68+
return throwable;
6969
}
7070

7171
/**
@@ -92,7 +92,7 @@ public boolean hasValue() {
9292
* @return a value indicating whether this notification has an exception.
9393
*/
9494
public boolean hasException() {
95-
return isOnError() && exception != null;
95+
return isOnError() && throwable != null;
9696
}
9797

9898
/**

0 commit comments

Comments
 (0)