The following issues were found

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

Line: 26

               */
public final class ObservableJust<T> extends Observable<T> implements ScalarSupplier<T> {

    private final T value;
    public ObservableJust(final T value) {
        this.value = value;
    }

    @Override

            

Reported by PMD.

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

Line: 16

              
package io.reactivex.rxjava3.internal.operators.observable;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.fuseable.ScalarSupplier;
import io.reactivex.rxjava3.internal.operators.observable.ObservableScalarXMap.ScalarDisposable;

/**
 * Represents a constant scalar value.

            

Reported by PMD.

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

Line: 24

              public class FlowableInternalHelperTest extends RxJavaTest {

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

    @Test
    public void requestMaxEnum() {

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 29

                  }

    @Test
    public void requestMaxEnum() {
        TestHelper.checkEnum(FlowableInternalHelper.RequestMax.class);
    }
}

            

Reported by PMD.

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

Line: 26

              public class CompletableToFlowableTest extends RxJavaTest {

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

            

Reported by PMD.

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

Line: 19

              import org.junit.Test;
import org.reactivestreams.Publisher;

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

public class CompletableToFlowableTest extends RxJavaTest {


            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/core/RxJavaTest.java
2 issues
This abstract class does not have any abstract methods
Design

Line: 23

              
import io.reactivex.rxjava3.testsupport.SuppressUndeliverableRule;

public abstract class RxJavaTest {
    @Rule
    public Timeout globalTimeout = new Timeout(5, TimeUnit.MINUTES);
    @Rule
    public final SuppressUndeliverableRule suppressUndeliverableRule = new SuppressUndeliverableRule();


            

Reported by PMD.

Avoid unused imports such as 'org.junit'
Design

Line: 18

              
import java.util.concurrent.TimeUnit;

import org.junit.*;
import org.junit.rules.Timeout;

import io.reactivex.rxjava3.testsupport.SuppressUndeliverableRule;

public abstract class RxJavaTest {

            

Reported by PMD.

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

Line: 26

              public class MaybeMapTest extends RxJavaTest {

    @Test
    public void doubleOnSubscribe() {
        TestHelper.checkDoubleOnSubscribeMaybe(new Function<Maybe<Object>, MaybeSource<Object>>() {
            @Override
            public MaybeSource<Object> apply(Maybe<Object> m) throws Exception {
                return m.map(Functions.identity());
            }

            

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.internal.functions.Functions;
import io.reactivex.rxjava3.testsupport.TestHelper;

public class MaybeMapTest extends RxJavaTest {

            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/flowable/FlowableNotificationTest.java
2 issues
Avoid unused imports such as 'org.junit'
Design

Line: 16

              
package io.reactivex.rxjava3.flowable;

import org.junit.*;

import io.reactivex.rxjava3.core.*;

public class FlowableNotificationTest extends RxJavaTest {


            

Reported by PMD.

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

Line: 18

              
import org.junit.*;

import io.reactivex.rxjava3.core.*;

public class FlowableNotificationTest extends RxJavaTest {

    @Test(expected = NullPointerException.class)
    public void onNextIntegerNotificationDoesNotEqualNullNotification() {

            

Reported by PMD.

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

Line: 25

              public class MaybeErrorTest extends RxJavaTest {

    @Test
    public void errorSupplierThrows() {
        Maybe.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 MaybeErrorTest extends RxJavaTest {


            

Reported by PMD.

src/test/java/io/reactivex/rxjava3/internal/jdk8/MapOptionalTckTest.java
2 issues
Potential violation of Law of Demeter (method chain calls)
Design

Line: 36

              
    @Override
    public Publisher<Integer> createFailedPublisher() {
        return Flowable.just(1).<Integer>mapOptional(v -> null).onBackpressureDrop();
    }
}

            

Reported by PMD.

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

Line: 36

              
    @Override
    public Publisher<Integer> createFailedPublisher() {
        return Flowable.just(1).<Integer>mapOptional(v -> null).onBackpressureDrop();
    }
}

            

Reported by PMD.

src/main/java/io/reactivex/rxjava3/subjects/Subject.java
2 issues
Avoid unused imports such as 'io.reactivex.rxjava3.annotations'
Design

Line: 16

              
package io.reactivex.rxjava3.subjects;

import io.reactivex.rxjava3.annotations.*;
import io.reactivex.rxjava3.core.*;

/**
 * Represents an {@link Observer} and an {@link Observable} at the same time, allowing
 * multicasting events from a single source to multiple child {@code Observer}s.

            

Reported by PMD.

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

Line: 17

              package io.reactivex.rxjava3.subjects;

import io.reactivex.rxjava3.annotations.*;
import io.reactivex.rxjava3.core.*;

/**
 * Represents an {@link Observer} and an {@link Observable} at the same time, allowing
 * multicasting events from a single source to multiple child {@code Observer}s.
 * <p>

            

Reported by PMD.

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

Line: 44

                  @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: 45

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

            

Reported by PMD.