The following issues were found

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

Line: 29

               */
public final class SingleOnErrorComplete<T> extends Maybe<T> {

    final Single<T> source;

    final Predicate<? super Throwable> predicate;

    public SingleOnErrorComplete(Single<T> source,
            Predicate<? super Throwable> predicate) {

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

              
    final Single<T> source;

    final Predicate<? super Throwable> predicate;

    public SingleOnErrorComplete(Single<T> source,
            Predicate<? super Throwable> predicate) {
        this.source = source;
        this.predicate = predicate;

            

Reported by PMD.

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

Line: 16

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

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.operators.maybe.MaybeOnErrorComplete;

/**
 * Emits an onComplete if the source emits an onError and the predicate returns true for

            

Reported by PMD.

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

Line: 21

              
public final class CompletableFromObservable<T> extends Completable {

    final ObservableSource<T> observable;

    public CompletableFromObservable(ObservableSource<T> observable) {
        this.observable = observable;
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 33

                  }

    static final class CompletableFromObservableObserver<T> implements Observer<T> {
        final CompletableObserver co;

        CompletableFromObservableObserver(CompletableObserver co) {
            this.co = co;
        }


            

Reported by PMD.

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

Line: 16

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

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

public final class CompletableFromObservable<T> extends Completable {

    final ObservableSource<T> observable;

            

Reported by PMD.

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

Line: 21

              
public final class CompletableFromSingle<T> extends Completable {

    final SingleSource<T> single;

    public CompletableFromSingle(SingleSource<T> single) {
        this.single = single;
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 33

                  }

    static final class CompletableFromSingleObserver<T> implements SingleObserver<T> {
        final CompletableObserver co;

        CompletableFromSingleObserver(CompletableObserver co) {
            this.co = co;
        }


            

Reported by PMD.

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

Line: 16

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

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

public final class CompletableFromSingle<T> extends Completable {

    final SingleSource<T> single;

            

Reported by PMD.

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

Line: 29

               */
public final class FlowableTakePublisher<T> extends Flowable<T> {

    final Publisher<T> source;
    final long limit;
    public FlowableTakePublisher(Publisher<T> source, long limit) {
        this.source = source;
        this.limit = limit;
    }

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 30

              public final class FlowableTakePublisher<T> extends Flowable<T> {

    final Publisher<T> source;
    final long limit;
    public FlowableTakePublisher(Publisher<T> source, long limit) {
        this.source = source;
        this.limit = limit;
    }


            

Reported by PMD.

Avoid unused imports such as 'org.reactivestreams'
Design

Line: 16

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

import org.reactivestreams.*;

import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.internal.operators.flowable.FlowableTake.TakeSubscriber;

/**

            

Reported by PMD.

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

Line: 30

               */
public final class SingleToFlowable<T> extends Flowable<T> {

    final SingleSource<? extends T> source;

    public SingleToFlowable(SingleSource<? extends T> source) {
        this.source = source;
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 46

              
        private static final long serialVersionUID = 187782011903685568L;

        Disposable upstream;

        SingleToFlowableObserver(Subscriber<? super T> downstream) {
            super(downstream);
        }


            

Reported by PMD.

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

Line: 18

              
import org.reactivestreams.Subscriber;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.subscriptions.DeferredScalarSubscription;

/**

            

Reported by PMD.

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

Line: 28

               */
public final class SingleToObservable<T> extends Observable<T> {

    final SingleSource<? extends T> source;

    public SingleToObservable(SingleSource<? extends T> source) {
        this.source = source;
    }


            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 56

                  implements SingleObserver<T> {

        private static final long serialVersionUID = 3786543492451018833L;
        Disposable upstream;

        SingleToObservableObserver(Observer<? super T> downstream) {
            super(downstream);
        }


            

Reported by PMD.

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

Line: 16

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

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.observers.DeferredScalarDisposable;

/**

            

Reported by PMD.

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

Line: 25

              import io.reactivex.rxjava3.internal.util.ExceptionHelper;

public final class FlowableError<T> extends Flowable<T> {
    final Supplier<? extends Throwable> errorSupplier;
    public FlowableError(Supplier<? extends Throwable> errorSupplier) {
        this.errorSupplier = errorSupplier;
    }

    @Override

            

Reported by PMD.

A catch statement should never catch throwable since it includes errors.
Error

Line: 35

                      Throwable error;
        try {
            error = ExceptionHelper.nullCheck(errorSupplier.get(), "Callable returned a null Throwable.");
        } catch (Throwable t) {
            Exceptions.throwIfFatal(t);
            error = t;
        }
        EmptySubscription.error(error, s);
    }

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '34'-'37').
Error

Line: 34

                  public void subscribeActual(Subscriber<? super T> s) {
        Throwable error;
        try {
            error = ExceptionHelper.nullCheck(errorSupplier.get(), "Callable returned a null Throwable.");
        } catch (Throwable t) {
            Exceptions.throwIfFatal(t);
            error = t;
        }
        EmptySubscription.error(error, s);

            

Reported by PMD.

src/jmh/java/io/reactivex/rxjava3/core/PerfObserver.java
3 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 23

              import io.reactivex.rxjava3.disposables.Disposable;

public final class PerfObserver implements Observer<Object> {
    final CountDownLatch cdl;
    final Blackhole bh;
    public PerfObserver(Blackhole bh) {
        this.bh = bh;
        this.cdl = new CountDownLatch(1);
    }

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 24

              
public final class PerfObserver implements Observer<Object> {
    final CountDownLatch cdl;
    final Blackhole bh;
    public PerfObserver(Blackhole bh) {
        this.bh = bh;
        this.cdl = new CountDownLatch(1);
    }


            

Reported by PMD.

Avoid printStackTrace(); use a logger call instead.
Design

Line: 42

              
    @Override
    public void onError(Throwable e) {
        e.printStackTrace();
        cdl.countDown();
    }

    @Override
    public void onComplete() {

            

Reported by PMD.

src/jmh/java/io/reactivex/rxjava3/core/PerfInteropConsumer.java
3 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 28

              public final class PerfInteropConsumer implements Subscriber<Object>, Observer<Object>,
SingleObserver<Object>, CompletableObserver, MaybeObserver<Object> {

    final Blackhole bh;

    public PerfInteropConsumer(Blackhole bh) {
        this.bh = bh;
    }


            

Reported by PMD.

Avoid printStackTrace(); use a logger call instead.
Design

Line: 55

              
    @Override
    public void onError(Throwable t) {
        t.printStackTrace();
    }

    @Override
    public void onComplete() {
        bh.consume(true);

            

Reported by PMD.

Avoid unused imports such as 'org.reactivestreams'
Design

Line: 17

              package io.reactivex.rxjava3.core;

import org.openjdk.jmh.infra.Blackhole;
import org.reactivestreams.*;

import io.reactivex.rxjava3.disposables.Disposable;

/**
 * A multi-type synchronous consumer that doesn't implement FlowableSubscriber and

            

Reported by PMD.

src/main/java/io/reactivex/rxjava3/observers/ResourceCompletableObserver.java
3 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 77

               */
public abstract class ResourceCompletableObserver implements CompletableObserver, Disposable {
    /** The active subscription. */
    private final AtomicReference<Disposable> upstream = new AtomicReference<>();

    /** The resource composite, can never be null. */
    private final ListCompositeDisposable resources = new ListCompositeDisposable();

    /**

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 80

                  private final AtomicReference<Disposable> upstream = new AtomicReference<>();

    /** The resource composite, can never be null. */
    private final ListCompositeDisposable resources = new ListCompositeDisposable();

    /**
     * Adds a resource to this {@code ResourceCompletableObserver}.
     *
     * @param resource the resource to add

            

Reported by PMD.

Avoid unused imports such as 'io.reactivex.rxjava3.internal.disposables'
Design

Line: 22

              import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.CompletableObserver;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.*;
import io.reactivex.rxjava3.internal.util.EndConsumerHelper;

/**
 * An abstract {@link CompletableObserver} that allows asynchronous cancellation of its subscription and associated resources.
 *

            

Reported by PMD.