Skip to content

Commit 7631333

Browse files
committed
Lambda unused parameter cleanup 2
1 parent dc2a6c7 commit 7631333

35 files changed

Lines changed: 125 additions & 264 deletions

.gitpod.yml

Lines changed: 0 additions & 139 deletions
This file was deleted.

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream0HTckTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public class FlatMapStream0HTckTest extends BaseTck<Integer> {
2727
@Override
2828
public Publisher<Integer> createPublisher(final long elements) {
2929
return
30-
Flowable.just(1).hide().flatMapStream(v -> IntStream.range(0, (int)elements).boxed())
30+
Flowable.just(1).hide().flatMapStream(_ -> IntStream.range(0, (int)elements).boxed())
3131
;
3232
}
3333

3434
@Override
3535
public Publisher<Integer> createFailedPublisher() {
3636
Stream<Integer> stream = Stream.of(1);
37-
stream.forEach(v -> { });
38-
return Flowable.just(1).hide().flatMapStream(v -> stream);
37+
stream.forEach(_ -> { });
38+
return Flowable.just(1).hide().flatMapStream(_ -> stream);
3939
}
4040
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream0TckTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public class FlatMapStream0TckTest extends BaseTck<Integer> {
2727
@Override
2828
public Publisher<Integer> createPublisher(final long elements) {
2929
return
30-
Flowable.just(1).flatMapStream(v -> IntStream.range(0, (int)elements).boxed())
30+
Flowable.just(1).flatMapStream(_ -> IntStream.range(0, (int)elements).boxed())
3131
;
3232
}
3333

3434
@Override
3535
public Publisher<Integer> createFailedPublisher() {
3636
Stream<Integer> stream = Stream.of(1);
37-
stream.forEach(v -> { });
38-
return Flowable.just(1).flatMapStream(v -> stream);
37+
stream.forEach(_ -> { });
38+
return Flowable.just(1).flatMapStream(_ -> stream);
3939
}
4040
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream1HTckTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Publisher<Integer> createPublisher(final long elements) {
3434
@Override
3535
public Publisher<Integer> createFailedPublisher() {
3636
Stream<Integer> stream = Stream.of(1);
37-
stream.forEach(v -> { });
38-
return Flowable.just(1).hide().flatMapStream(v -> stream);
37+
stream.forEach(_ -> { });
38+
return Flowable.just(1).hide().flatMapStream(_ -> stream);
3939
}
4040
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream1TckTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Publisher<Integer> createPublisher(final long elements) {
3434
@Override
3535
public Publisher<Integer> createFailedPublisher() {
3636
Stream<Integer> stream = Stream.of(1);
37-
stream.forEach(v -> { });
38-
return Flowable.just(1).flatMapStream(v -> stream);
37+
stream.forEach(_ -> { });
38+
return Flowable.just(1).flatMapStream(_ -> stream);
3939
}
4040
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream2HTckTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Publisher<Integer> createPublisher(final long elements) {
4141
@Override
4242
public Publisher<Integer> createFailedPublisher() {
4343
Stream<Integer> stream = Stream.of(1);
44-
stream.forEach(v -> { });
45-
return Flowable.just(1).hide().flatMapStream(v -> stream);
44+
stream.forEach(_ -> { });
45+
return Flowable.just(1).hide().flatMapStream(_ -> stream);
4646
}
4747
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlatMapStream2TckTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Publisher<Integer> createPublisher(final long elements) {
4141
@Override
4242
public Publisher<Integer> createFailedPublisher() {
4343
Stream<Integer> stream = Stream.of(1);
44-
stream.forEach(v -> { });
45-
return Flowable.just(1).flatMapStream(v -> stream);
44+
stream.forEach(_ -> { });
45+
return Flowable.just(1).flatMapStream(_ -> stream);
4646
}
4747
}

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlowableFlatMapStreamTest.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class FlowableFlatMapStreamTest extends RxJavaTest {
3636
@Test
3737
public void empty() {
3838
Flowable.empty()
39-
.flatMapStream(v -> Stream.of(1, 2, 3, 4, 5))
39+
.flatMapStream(_ -> Stream.of(1, 2, 3, 4, 5))
4040
.test()
4141
.assertResult();
4242
}
@@ -45,7 +45,7 @@ public void empty() {
4545
public void emptyHidden() {
4646
Flowable.empty()
4747
.hide()
48-
.flatMapStream(v -> Stream.of(1, 2, 3, 4, 5))
48+
.flatMapStream(_ -> Stream.of(1, 2, 3, 4, 5))
4949
.test()
5050
.assertResult();
5151
}
@@ -69,15 +69,15 @@ public void justHidden() {
6969
@Test
7070
public void error() {
7171
Flowable.error(new TestException())
72-
.flatMapStream(v -> Stream.of(1, 2, 3, 4, 5))
72+
.flatMapStream(_ -> Stream.of(1, 2, 3, 4, 5))
7373
.test()
7474
.assertFailure(TestException.class);
7575
}
7676

7777
@Test
7878
public void supplierFusedError() {
7979
Flowable.fromCallable(() -> { throw new TestException(); })
80-
.flatMapStream(v -> Stream.of(1, 2, 3, 4, 5))
80+
.flatMapStream(_ -> Stream.of(1, 2, 3, 4, 5))
8181
.test()
8282
.assertFailure(TestException.class);
8383
}
@@ -86,7 +86,7 @@ public void supplierFusedError() {
8686
public void errorHidden() {
8787
Flowable.error(new TestException())
8888
.hide()
89-
.flatMapStream(v -> Stream.of(1, 2, 3, 4, 5))
89+
.flatMapStream(_ -> Stream.of(1, 2, 3, 4, 5))
9090
.test()
9191
.assertFailure(TestException.class);
9292
}
@@ -123,7 +123,7 @@ public void rangeHidden() {
123123
@Test
124124
public void rangeToEmpty() {
125125
Flowable.range(1, 5)
126-
.flatMapStream(v -> Stream.of())
126+
.flatMapStream(_ -> Stream.of())
127127
.test()
128128
.assertResult();
129129
}
@@ -251,12 +251,12 @@ public void crossMapBackpressuredHidden() {
251251

252252
@Test
253253
public void onSubscribe() {
254-
TestHelper.checkDoubleOnSubscribeFlowable(f -> f.flatMapStream(v -> Stream.of(1, 2)));
254+
TestHelper.checkDoubleOnSubscribeFlowable(f -> f.flatMapStream(_ -> Stream.of(1, 2)));
255255
}
256256

257257
@Test
258258
public void badRequest() {
259-
TestHelper.assertBadRequestReported(UnicastProcessor.create().flatMapStream(v -> Stream.of(1, 2)));
259+
TestHelper.assertBadRequestReported(UnicastProcessor.create().flatMapStream(_ -> Stream.of(1, 2)));
260260
}
261261

262262
@Test
@@ -272,7 +272,7 @@ protected void subscribeActual(Subscriber<? super Integer> s) {
272272
s.onError(new TestException());
273273
}
274274
}
275-
.flatMapStream(v -> Stream.of(1, 2), 1)
275+
.flatMapStream(_ -> Stream.of(1, 2), 1)
276276
.test(0)
277277
.assertFailure(QueueOverflowException.class);
278278

@@ -283,31 +283,31 @@ protected void subscribeActual(Subscriber<? super Integer> s) {
283283
@Test
284284
public void mapperThrows() {
285285
Flowable.just(1).hide()
286-
.concatMapStream(v -> { throw new TestException(); })
286+
.concatMapStream(_ -> { throw new TestException(); })
287287
.test()
288288
.assertFailure(TestException.class);
289289
}
290290

291291
@Test
292292
public void mapperNull() {
293293
Flowable.just(1).hide()
294-
.concatMapStream(v -> null)
294+
.concatMapStream(_ -> null)
295295
.test()
296296
.assertFailure(NullPointerException.class);
297297
}
298298

299299
@Test
300300
public void streamNull() {
301301
Flowable.just(1).hide()
302-
.concatMapStream(v -> Stream.of(1, null))
302+
.concatMapStream(_ -> Stream.of(1, null))
303303
.test()
304304
.assertFailure(NullPointerException.class, 1);
305305
}
306306

307307
@Test
308308
public void hasNextThrows() {
309309
Flowable.just(1).hide()
310-
.concatMapStream(v -> Stream.generate(() -> { throw new TestException(); }))
310+
.concatMapStream(_ -> Stream.generate(() -> { throw new TestException(); }))
311311
.test()
312312
.assertFailure(TestException.class);
313313
}
@@ -316,7 +316,7 @@ public void hasNextThrows() {
316316
public void hasNextThrowsLater() {
317317
AtomicInteger counter = new AtomicInteger();
318318
Flowable.just(1).hide()
319-
.concatMapStream(v -> Stream.generate(() -> {
319+
.concatMapStream(_ -> Stream.generate(() -> {
320320
if (counter.getAndIncrement() == 0) {
321321
return 1;
322322
}
@@ -334,7 +334,7 @@ public void mapperThrowsWhenUpstreamErrors() throws Throwable {
334334
AtomicInteger counter = new AtomicInteger();
335335

336336
TestSubscriber<Integer> ts = pp.hide()
337-
.concatMapStream(v -> {
337+
.concatMapStream(_ -> {
338338
if (counter.getAndIncrement() == 0) {
339339
return Stream.of(1, 2);
340340
}
@@ -386,7 +386,7 @@ public Integer next() {
386386

387387
Flowable.just(1)
388388
.hide()
389-
.concatMapStream(v -> stream)
389+
.concatMapStream(_ -> stream)
390390
.subscribe(ts);
391391

392392
ts.assertEmpty();
@@ -396,7 +396,7 @@ public Integer next() {
396396
public void asyncUpstreamFused() {
397397
UnicastProcessor<Integer> up = UnicastProcessor.create();
398398

399-
TestSubscriber<Integer> ts = up.flatMapStream(v -> Stream.of(1, 2))
399+
TestSubscriber<Integer> ts = up.flatMapStream(_ -> Stream.of(1, 2))
400400
.test();
401401

402402
assertTrue(up.hasSubscribers());
@@ -416,7 +416,7 @@ public void asyncUpstreamFusionBoundary() {
416416

417417
TestSubscriber<Integer> ts = up
418418
.map(v -> v + 1)
419-
.flatMapStream(v -> Stream.of(1, 2))
419+
.flatMapStream(_ -> Stream.of(1, 2))
420420
.test();
421421

422422
assertTrue(up.hasSubscribers());
@@ -435,9 +435,9 @@ public void fusedPollCrash() {
435435
UnicastProcessor<Integer> up = UnicastProcessor.create();
436436

437437
TestSubscriber<Integer> ts = up
438-
.map(v -> { throw new TestException(); })
438+
.map(_ -> { throw new TestException(); })
439439
.compose(TestHelper.flowableStripBoundary())
440-
.flatMapStream(v -> Stream.of(1, 2))
440+
.flatMapStream(_ -> Stream.of(1, 2))
441441
.test();
442442

443443
assertTrue(up.hasSubscribers());

0 commit comments

Comments
 (0)