23
23
public class Notification <T > {
24
24
25
25
private final Kind kind ;
26
- private final Throwable exception ;
26
+ private final Throwable throwable ;
27
27
private final T value ;
28
28
29
29
/**
@@ -34,7 +34,7 @@ public class Notification<T> {
34
34
*/
35
35
public Notification (T value ) {
36
36
this .value = value ;
37
- this .exception = null ;
37
+ this .throwable = null ;
38
38
this .kind = Kind .OnNext ;
39
39
}
40
40
@@ -45,7 +45,7 @@ public Notification(T value) {
45
45
* The exception passed to the onError notification.
46
46
*/
47
47
public Notification (Throwable exception ) {
48
- this .exception = exception ;
48
+ this .throwable = exception ;
49
49
this .value = null ;
50
50
this .kind = Kind .OnError ;
51
51
}
@@ -54,7 +54,7 @@ public Notification(Throwable exception) {
54
54
* A constructor used to represent an onCompleted notification.
55
55
*/
56
56
public Notification () {
57
- this .exception = null ;
57
+ this .throwable = null ;
58
58
this .value = null ;
59
59
this .kind = Kind .OnCompleted ;
60
60
}
@@ -65,7 +65,7 @@ public Notification() {
65
65
* @return Throwable associated with an onError notification.
66
66
*/
67
67
public Throwable getThrowable () {
68
- return exception ;
68
+ return throwable ;
69
69
}
70
70
71
71
/**
@@ -92,7 +92,7 @@ public boolean hasValue() {
92
92
* @return a value indicating whether this notification has an exception.
93
93
*/
94
94
public boolean hasException () {
95
- return isOnError () && exception != null ;
95
+ return isOnError () && throwable != null ;
96
96
}
97
97
98
98
/**
0 commit comments