The following issues were found

src/main/java/io/reactivex/rxjava3/subscribers/DefaultSubscriber.java
2 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 77

               */
public abstract class DefaultSubscriber<T> implements FlowableSubscriber<T> {

    Subscription upstream;

    @Override
    public final void onSubscribe(Subscription s) {
        if (EndConsumerHelper.validate(this.upstream, s, getClass())) {
            this.upstream = s;

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 104

                  protected final void cancel() {
        Subscription s = this.upstream;
        this.upstream = SubscriptionHelper.CANCELLED;
        s.cancel();
    }
    /**
     * Called once the subscription has been set on this observer; override this
     * to perform initialization or issue an initial request.
     * <p>

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleFlatMapCompletableTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 25

              public class SingleFlatMapCompletableTest extends RxJavaTest {

    @Test
    public void dispose() {
        TestHelper.checkDisposed(Single.just(1).flatMapCompletable(new Function<Integer, Completable>() {
            @Override
            public Completable apply(Integer v) throws Exception {
                return Completable.complete();
            }

            

Reported by PMD.

Avoid unused imports such as 'io.reactivex.rxjava3.core'
Design

Line: 18

              
import org.junit.Test;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.testsupport.TestHelper;

public class SingleFlatMapCompletableTest extends RxJavaTest {


            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleErrorTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 25

              public class SingleErrorTest extends RxJavaTest {

    @Test
    public void errorSupplierThrows() {
        Single.error(new Supplier<Throwable>() {
            @Override
            public Throwable get() throws Exception {
                throw new TestException();
            }

            

Reported by PMD.

Avoid unused imports such as 'io.reactivex.rxjava3.core'
Design

Line: 18

              
import org.junit.Test;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.TestException;
import io.reactivex.rxjava3.functions.Supplier;

public class SingleErrorTest extends RxJavaTest {


            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableToObservableTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 25

              public class CompletableToObservableTest extends RxJavaTest {

    @Test
    public void doubleOnSubscribe() {
        TestHelper.checkDoubleOnSubscribeCompletableToObservable(new Function<Completable, Observable<?>>() {
            @Override
            public Observable<?> apply(Completable c) throws Exception {
                return c.toObservable();
            }

            

Reported by PMD.

Avoid unused imports such as 'io.reactivex.rxjava3.core'
Design

Line: 18

              
import org.junit.Test;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.testsupport.TestHelper;

public class CompletableToObservableTest extends RxJavaTest {


            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleLiftTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 24

              public class SingleLiftTest extends RxJavaTest {

    @Test
    public void normal() {

        Single.just(1).lift(new SingleOperator<Integer, Integer>() {
            @Override
            public SingleObserver<Integer> apply(final SingleObserver<? super Integer> observer) throws Exception {
                return new SingleObserver<Integer>() {

            

Reported by PMD.

Avoid unused imports such as 'io.reactivex.rxjava3.core'
Design

Line: 18

              
import org.junit.Test;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;

public class SingleLiftTest extends RxJavaTest {

    @Test

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/jdk8/FlatMapStream1TckTest.java
2 issues
Potential violation of Law of Demeter (object not created locally)
Design

Line: 37

                  @Override
    public Publisher<Integer> createFailedPublisher() {
        Stream<Integer> stream = Stream.of(1);
        stream.forEach(v -> { });
        return Flowable.just(1).flatMapStream(v -> stream);
    }
}

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 38

                  public Publisher<Integer> createFailedPublisher() {
        Stream<Integer> stream = Stream.of(1);
        stream.forEach(v -> { });
        return Flowable.just(1).flatMapStream(v -> stream);
    }
}

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/flowable/FlowableDoAfterNextTest.java
1 issues
JUnit assertions should include a message
Design

Line: 41

                          .test()
            .assertError(e)
            .assertValue(1);
        assertEquals(1, count.get());
    }
}

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/jdk8/FromStreamTckTest.java
1 issues
Potential violation of Law of Demeter (object not created locally)
Design

Line: 41

                  @Override
    public Publisher<Integer> createFailedPublisher() {
        Stream<Integer> stream = Stream.of(1);
        stream.forEach(v -> { });
        return Flowable.fromStream(stream);
    }
}

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleConcatArrayEagerDelayErrorTest.java
1 issues
JUnit tests should include assert() or fail()
Design

Line: 24

              public class SingleConcatArrayEagerDelayErrorTest {

    @Test
    public void normal() {
        Single.concatArrayEagerDelayError(
                Single.just(1),
                Single.<Integer>error(new TestException()),
                Single.just(2)
        )

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/operators/mixed/ScalarXMapZHelperTest.java
1 issues
JUnit tests should include assert() or fail()
Design

Line: 24

              public class ScalarXMapZHelperTest extends RxJavaTest {

    @Test
    public void utilityClass() {
        TestHelper.checkUtilityClass(ScalarXMapZHelper.class);
    }
}

            

Reported by PMD.