Skip to content

Commit 877702e

Browse files
authored
3.x: Multiple empty line detection to ignore whitespace (#6662)
* 3.x: style check for two subsequent empty lines in source files * Remove the separate file.
1 parent 6518eb9 commit 877702e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/main/java/io/reactivex/rxjava3/core/Flowable.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15326,7 +15326,6 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
1532615326
return RxJavaPlugins.onAssembly(new FlowableSwitchMapSingle<T, R>(this, mapper, true));
1532715327
}
1532815328

15329-
1533015329
/**
1533115330
* Returns a Flowable that emits only the first {@code count} items emitted by the source Publisher. If the source emits fewer than
1533215331
* {@code count} items then all of its items are emitted.
@@ -15368,7 +15367,7 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
1536815367
* @see <a href="http://reactivex.io/documentation/operators/take.html">ReactiveX operators documentation: Take</a>
1536915368
*/
1537015369
@CheckReturnValue
15371-
@BackpressureSupport(BackpressureKind.FULL)
15370+
@BackpressureSupport(BackpressureKind.FULL)
1537215371
@SchedulerSupport(SchedulerSupport.NONE)
1537315372
public final Flowable<T> take(long count) {
1537415373
if (count < 0) {

src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableTakeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void subscribe(Subscriber<? super String> subscriber) {
142142
RxJavaPlugins.reset();
143143
}
144144
}
145-
145+
146146
@Test
147147
public void takeEmitsErrors() {
148148
Flowable.error(new TestException())
@@ -151,7 +151,7 @@ public void takeEmitsErrors() {
151151
.assertNoValues()
152152
.assertError(TestException.class);
153153
}
154-
154+
155155
@Test
156156
public void takeRequestOverflow() {
157157
TestSubscriber<Integer> ts = Flowable.just(1, 2, 3)

src/test/java/io/reactivex/rxjava3/validators/TooManyEmptyNewLines.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static void findPattern(int newLines) throws Exception {
101101
if (line1.isEmpty()) {
102102
int c = 1;
103103
for (int j = i + 1; j < lines.size(); j++) {
104-
if (lines.get(j).isEmpty()) {
104+
if (lines.get(j).trim().isEmpty()) {
105105
c++;
106106
} else {
107107
break;

0 commit comments

Comments
 (0)