File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
src/main/java/rx/internal/operators Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -116,26 +116,22 @@ public synchronized int next(T value) {
116
116
}
117
117
public void emit (int index , Subscriber <T > onNextAndComplete , Subscriber <?> onError ) {
118
118
T localValue ;
119
- boolean localHasValue ;
120
119
synchronized (this ) {
121
120
if (emitting || !hasValue || index != this .index ) {
122
121
return ;
123
122
}
124
123
localValue = value ;
125
- localHasValue = hasValue ;
126
124
127
125
value = null ;
128
126
hasValue = false ;
129
127
emitting = true ;
130
128
}
131
129
132
- if (localHasValue ) {
133
- try {
134
- onNextAndComplete .onNext (localValue );
135
- } catch (Throwable e ) {
136
- onError .onError (e );
137
- return ;
138
- }
130
+ try {
131
+ onNextAndComplete .onNext (localValue );
132
+ } catch (Throwable e ) {
133
+ onError .onError (e );
134
+ return ;
139
135
}
140
136
141
137
// Check if a termination was requested in the meantime.
You can’t perform that action at this time.
0 commit comments