File tree Expand file tree Collapse file tree 5 files changed +6
-11
lines changed
rxjava-core/src/main/java/rx Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public Subscription subscribe(Observer<T> observer) {
131
131
AtomicObservableSubscription subscription = new AtomicObservableSubscription ();
132
132
return subscription .wrap (onSubscribe .call (new AtomicObserver <T >(subscription , observer )));
133
133
}
134
- };
134
+ }
135
135
136
136
@ SuppressWarnings ({ "rawtypes" , "unchecked" })
137
137
public Subscription subscribe (final Map <String , Object > callbacks ) {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public Subscription call(final Observer<T> observer) {
48
48
return subscription .wrap (that .subscribe (new Observer <T >() {
49
49
public void onNext (T value ) {
50
50
try {
51
- if (( boolean ) predicate .call (value )) {
51
+ if (predicate .call (value )) {
52
52
observer .onNext (value );
53
53
}
54
54
} catch (Exception ex ) {
@@ -79,10 +79,7 @@ public void testFilter() {
79
79
80
80
@ Override
81
81
public Boolean call (String t1 ) {
82
- if (t1 .equals ("two" ))
83
- return true ;
84
- else
85
- return false ;
82
+ return t1 .equals ("two" );
86
83
}
87
84
}));
88
85
Original file line number Diff line number Diff line change @@ -260,9 +260,7 @@ private void stop() {
260
260
if (running .compareAndSet (true , false )) {
261
261
/* propogate to all Observers to unsubscribe if this thread succeeded in setting running=false */
262
262
for (ZipObserver <T , ?> rw : observers ) {
263
- if (rw .subscription != null ) {
264
- rw .subscription .unsubscribe ();
265
- }
263
+ rw .subscription .unsubscribe ();
266
264
}
267
265
}
268
266
}
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public void onNext(T args) {
76
76
public static class UnitTest {
77
77
@ Test
78
78
public void test () {
79
- Subject <Integer > subject = Subject .< Integer > create ();
79
+ Subject <Integer > subject = Subject .create ();
80
80
final AtomicReference <List <Notification <String >>> actualRef = new AtomicReference <List <Notification <String >>>();
81
81
82
82
Observable <List <Notification <Integer >>> wNotificationsList = subject .materialize ().toList ();
Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ public void run() {
373
373
}
374
374
375
375
private static enum TestConcurrencyObserverEvent {
376
- onCompleted , onError , onNext ;
376
+ onCompleted , onError , onNext
377
377
}
378
378
379
379
private static class TestConcurrencyObserver implements Observer <String > {
You can’t perform that action at this time.
0 commit comments