Skip to content

Commit 9f24df9

Browse files
committed
Whitespace fixes
1 parent 34b4b6b commit 9f24df9

File tree

5 files changed

+19
-25
lines changed

5 files changed

+19
-25
lines changed

src/main/java/io/reactivex/internal/operators/flowable/FlowableScan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static final class ScanSubscriber<T> implements Subscriber<T>, Subscription {
4040
Subscription s;
4141

4242
T value;
43-
43+
4444
boolean done;
4545

4646
ScanSubscriber(Subscriber<? super T> actual, BiFunction<T, T, T> accumulator) {

src/main/java/io/reactivex/internal/operators/flowable/FlowableScanSeed.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static final class ScanSeedSubscriber<T, R> extends SinglePostCompleteSubscriber
5252
private static final long serialVersionUID = -1776795561228106469L;
5353

5454
final BiFunction<R, ? super T, R> accumulator;
55-
55+
5656
boolean done;
5757

5858
ScanSeedSubscriber(Subscriber<? super R> actual, BiFunction<R, ? super T, R> accumulator, R value) {
@@ -66,7 +66,7 @@ public void onNext(T t) {
6666
if (done) {
6767
return;
6868
}
69-
69+
7070
R v = value;
7171

7272
R u;

src/main/java/io/reactivex/internal/operators/observable/ObservableScan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static final class ScanObserver<T> implements Observer<T>, Disposable {
4040
Disposable s;
4141

4242
T value;
43-
43+
4444
boolean done;
4545

4646
ScanObserver(Observer<? super T> actual, BiFunction<T, T, T> accumulator) {

src/test/java/io/reactivex/flowable/FlowableScanTests.java

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@
1515

1616
import static org.junit.Assert.assertEquals;
1717

18-
import java.util.Arrays;
19-
import java.util.HashMap;
20-
import java.util.List;
21-
import java.util.concurrent.Callable;
22-
import java.util.concurrent.CopyOnWriteArrayList;
18+
import java.util.*;
19+
import java.util.concurrent.*;
2320
import java.util.concurrent.atomic.AtomicInteger;
24-
import java.util.concurrent.atomic.AtomicReference;
2521

26-
import org.junit.Assert;
2722
import org.junit.Test;
2823

2924
import io.reactivex.Flowable;
@@ -33,7 +28,6 @@
3328

3429
public class FlowableScanTests {
3530

36-
3731
@Test
3832
public void testUnsubscribeScan() {
3933

@@ -53,7 +47,7 @@ public void accept(HashMap<String, String> v) {
5347
}
5448
});
5549
}
56-
50+
5751
@Test
5852
public void testScanWithSeedDoesNotEmitErrorTwiceIfScanFunctionThrows() {
5953
final List<Throwable> list = new CopyOnWriteArrayList<Throwable>();
@@ -76,7 +70,7 @@ public void accept(Throwable t) throws Exception {
7670
RxJavaPlugins.reset();
7771
}
7872
}
79-
73+
8074
@Test
8175
public void testScanWithSeedDoesNotEmitTerminalEventTwiceIfScanFunctionThrows() {
8276
final RuntimeException e = new RuntimeException();
@@ -86,7 +80,7 @@ public void testScanWithSeedDoesNotEmitTerminalEventTwiceIfScanFunctionThrows()
8680
.assertNoValues()
8781
.assertError(e);
8882
}
89-
83+
9084
@Test
9185
public void testScanWithSeedDoesNotProcessOnNextAfterTerminalEventIfScanFunctionThrows() {
9286
final RuntimeException e = new RuntimeException();
@@ -103,15 +97,15 @@ public Integer apply(Integer n1, Integer n2) throws Exception {
10397
.assertError(e);
10498
assertEquals(1, count.get());
10599
}
106-
100+
107101
@Test
108102
public void testScanWithSeedCompletesNormally() {
109103
Flowable.just(1,2,3).scan(0, SUM)
110104
.test()
111105
.assertValues(0, 1, 3, 6)
112106
.assertComplete();
113107
}
114-
108+
115109
@Test
116110
public void testScanWithSeedWhenScanSeedProviderThrows() {
117111
final RuntimeException e = new RuntimeException();
@@ -130,7 +124,7 @@ public void testScanNoSeed() {
130124
.assertValues(1, 3, 6)
131125
.assertComplete();
132126
}
133-
127+
134128
@Test
135129
public void testScanNoSeedDoesNotEmitErrorTwiceIfScanFunctionThrows() {
136130
final List<Throwable> list = new CopyOnWriteArrayList<Throwable>();
@@ -153,7 +147,7 @@ public void accept(Throwable t) throws Exception {
153147
RxJavaPlugins.reset();
154148
}
155149
}
156-
150+
157151
@Test
158152
public void testScanNoSeedDoesNotEmitTerminalEventTwiceIfScanFunctionThrows() {
159153
final RuntimeException e = new RuntimeException();
@@ -163,7 +157,7 @@ public void testScanNoSeedDoesNotEmitTerminalEventTwiceIfScanFunctionThrows() {
163157
.assertValue(1)
164158
.assertError(e);
165159
}
166-
160+
167161
@Test
168162
public void testScanNoSeedDoesNotProcessOnNextAfterTerminalEventIfScanFunctionThrows() {
169163
final RuntimeException e = new RuntimeException();
@@ -180,7 +174,7 @@ public Integer apply(Integer n1, Integer n2) throws Exception {
180174
.assertError(e);
181175
assertEquals(1, count.get());
182176
}
183-
177+
184178
private static BiFunction<Integer,Integer, Integer> throwingBiFunction(final RuntimeException e) {
185179
return new BiFunction<Integer, Integer, Integer>() {
186180
@Override
@@ -197,7 +191,7 @@ public Integer apply(Integer t1, Integer t2) throws Exception {
197191
return t1 + t2;
198192
}
199193
};
200-
194+
201195
private static Callable<Integer> throwingCallable(final RuntimeException e) {
202196
return new Callable<Integer>() {
203197
@Override

src/test/java/io/reactivex/internal/operators/observable/ObservableScanTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public Object apply(Object a, Object b) throws Exception {
304304
}
305305
}, false, 1, 1, 0, 0);
306306
}
307-
307+
308308
@Test
309309
public void testScanFunctionThrowsAndUpstreamErrorsDoesNotResultInTwoTerminalEvents() {
310310
final RuntimeException err = new RuntimeException();
@@ -338,7 +338,7 @@ public Integer apply(Integer t1, Integer t2) throws Exception {
338338
RxJavaPlugins.reset();
339339
}
340340
}
341-
341+
342342
@Test
343343
public void testScanFunctionThrowsAndUpstreamCompletesDoesNotResultInTwoTerminalEvents() {
344344
final RuntimeException err = new RuntimeException();
@@ -360,7 +360,7 @@ public Integer apply(Integer t1, Integer t2) throws Exception {
360360
.assertError(err)
361361
.assertValue(1);
362362
}
363-
363+
364364
@Test
365365
public void testScanFunctionThrowsAndUpstreamEmitsOnNextResultsInScanFunctionBeingCalledOnlyOnce() {
366366
final RuntimeException err = new RuntimeException();

0 commit comments

Comments
 (0)