The following issues were found

src/main/java/io/reactivex/rxjava3/internal/jdk8/CompletableFromCompletionStage.java
4 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 30

               */
public final class CompletableFromCompletionStage<T> extends Completable {

    final CompletionStage<T> stage;

    public CompletableFromCompletionStage(CompletionStage<T> stage) {
        this.stage = stage;
    }


            

Reported by PMD.

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

Line: 51

                  static final class CompletionStageHandler<T>
    implements Disposable, BiConsumer<T, Throwable> {

        final CompletableObserver downstream;

        final BiConsumerAtomicReference<T> whenReference;

        CompletionStageHandler(CompletableObserver downstream, BiConsumerAtomicReference<T> whenReference) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 53

              
        final CompletableObserver downstream;

        final BiConsumerAtomicReference<T> whenReference;

        CompletionStageHandler(CompletableObserver downstream, BiConsumerAtomicReference<T> whenReference) {
            this.downstream = downstream;
            this.whenReference = whenReference;
        }

            

Reported by PMD.

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

Line: 19

              import java.util.concurrent.CompletionStage;
import java.util.function.BiConsumer;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.jdk8.FlowableFromCompletionStage.BiConsumerAtomicReference;

/**
 * Wrap a CompletionStage and signal its outcome.

            

Reported by PMD.

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

Line: 62

                  }

    static final class ToFlowableIterator<T> implements Iterator<Flowable<T>> {
        private final Iterator<? extends SingleSource<? extends T>> sit;

        ToFlowableIterator(Iterator<? extends SingleSource<? extends T>> sit) {
            this.sit = sit;
        }


            

Reported by PMD.

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

Line: 86

              
    static final class ToFlowableIterable<T> implements Iterable<Flowable<T>> {

        private final Iterable<? extends SingleSource<? extends T>> sources;

        ToFlowableIterable(Iterable<? extends SingleSource<? extends T>> sources) {
            this.sources = sources;
        }


            

Reported by PMD.

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

Line: 20

              
import org.reactivestreams.Publisher;

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

/**
 * Helper utility class to support Single with inner classes.
 */

            

Reported by PMD.

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

Line: 21

              import org.reactivestreams.Publisher;

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

/**
 * Helper utility class to support Single with inner classes.
 */
public final class SingleInternalHelper {

            

Reported by PMD.

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

Line: 22

              
public final class SingleHide<T> extends Single<T> {

    final SingleSource<? extends T> source;

    public SingleHide(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: 35

              
    static final class HideSingleObserver<T> implements SingleObserver<T>, Disposable {

        final SingleObserver<? super T> downstream;

        Disposable upstream;

        HideSingleObserver(SingleObserver<? super T> downstream) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 37

              
        final SingleObserver<? super T> downstream;

        Disposable upstream;

        HideSingleObserver(SingleObserver<? super T> downstream) {
            this.downstream = 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;

public final class SingleHide<T> extends Single<T> {


            

Reported by PMD.

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

Line: 25

              
public final class CompletableErrorSupplier extends Completable {

    final Supplier<? extends Throwable> errorSupplier;

    public CompletableErrorSupplier(Supplier<? extends Throwable> errorSupplier) {
        this.errorSupplier = errorSupplier;
    }


            

Reported by PMD.

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

Line: 37

              
        try {
            error = Objects.requireNonNull(errorSupplier.get(), "The error returned is null");
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            error = e;
        }

        EmptyDisposable.error(error, observer);

            

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.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.disposables.EmptyDisposable;

import java.util.Objects;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '36'-'39').
Error

Line: 36

                      Throwable error;

        try {
            error = Objects.requireNonNull(errorSupplier.get(), "The error returned is null");
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            error = e;
        }


            

Reported by PMD.

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

Line: 29

               */
public final class ObservableDoAfterNext<T> extends AbstractObservableWithUpstream<T, T> {

    final Consumer<? super T> onAfterNext;

    public ObservableDoAfterNext(ObservableSource<T> source, Consumer<? super T> onAfterNext) {
        super(source);
        this.onAfterNext = onAfterNext;
    }

            

Reported by PMD.

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

Line: 43

              
    static final class DoAfterObserver<T> extends BasicFuseableObserver<T, T> {

        final Consumer<? super T> onAfterNext;

        DoAfterObserver(Observer<? super T> actual, Consumer<? super T> onAfterNext) {
            super(actual);
            this.onAfterNext = onAfterNext;
        }

            

Reported by PMD.

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

Line: 57

                          if (sourceMode == NONE) {
                try {
                    onAfterNext.accept(t);
                } catch (Throwable ex) {
                    fail(ex);
                }
            }
        }


            

Reported by PMD.

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

Line: 17

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

import io.reactivex.rxjava3.annotations.Nullable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.internal.observers.BasicFuseableObserver;

/**
 * Calls a consumer after pushing the current item to the downstream.

            

Reported by PMD.

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

Line: 26

              
public final class FlowableIgnoreElementsCompletable<T> extends Completable implements FuseToFlowable<T> {

    final Flowable<T> source;

    public FlowableIgnoreElementsCompletable(Flowable<T> source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 43

                  }

    static final class IgnoreElementsSubscriber<T> implements FlowableSubscriber<T>, Disposable {
        final CompletableObserver downstream;

        Subscription upstream;

        IgnoreElementsSubscriber(CompletableObserver downstream) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 45

                  static final class IgnoreElementsSubscriber<T> implements FlowableSubscriber<T>, Disposable {
        final CompletableObserver downstream;

        Subscription upstream;

        IgnoreElementsSubscriber(CompletableObserver downstream) {
            this.downstream = downstream;
        }


            

Reported by PMD.

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

Line: 18

              
import org.reactivestreams.Subscription;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.fuseable.FuseToFlowable;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;


            

Reported by PMD.

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

Line: 31

                  }

    static final class CountObserver implements Observer<Object>, Disposable {
        final Observer<? super Long> downstream;

        Disposable upstream;

        long count;


            

Reported by PMD.

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

Line: 33

                  static final class CountObserver implements Observer<Object>, Disposable {
        final Observer<? super Long> downstream;

        Disposable upstream;

        long count;

        CountObserver(Observer<? super Long> downstream) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 35

              
        Disposable upstream;

        long count;

        CountObserver(Observer<? super Long> downstream) {
            this.downstream = downstream;
        }


            

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.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;

public final class ObservableCount<T> extends AbstractObservableWithUpstream<T, Long> {
    public ObservableCount(ObservableSource<T> source) {

            

Reported by PMD.

src/main/java/io/reactivex/rxjava3/internal/subscriptions/ScalarSubscription.java
4 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 31

              
    private static final long serialVersionUID = -3830916580126663321L;
    /** The single value to emit, set to null. */
    final T value;
    /** The actual subscriber. */
    final Subscriber<? super T> subscriber;

    /** No request has been issued yet. */
    static final int NO_REQUEST = 0;

            

Reported by PMD.

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

Line: 33

                  /** The single value to emit, set to null. */
    final T value;
    /** The actual subscriber. */
    final Subscriber<? super T> subscriber;

    /** No request has been issued yet. */
    static final int NO_REQUEST = 0;
    /** Request has been called.*/
    static final int REQUESTED = 1;

            

Reported by PMD.

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

Line: 55

                      if (compareAndSet(NO_REQUEST, REQUESTED)) {
            Subscriber<? super T> s = subscriber;

            s.onNext(value);
            if (get() != CANCELLED) {
                s.onComplete();
            }
        }


            

Reported by PMD.

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

Line: 57

              
            s.onNext(value);
            if (get() != CANCELLED) {
                s.onComplete();
            }
        }

    }


            

Reported by PMD.

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

Line: 31

               */
public final class ObservableFromCallable<T> extends Observable<T> implements Supplier<T> {

    final Callable<? extends T> callable;

    public ObservableFromCallable(Callable<? extends T> callable) {
        this.callable = callable;
    }


            

Reported by PMD.

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

Line: 47

                      T value;
        try {
            value = ExceptionHelper.nullCheck(callable.call(), "Callable returned a null value.");
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            if (!d.isDisposed()) {
                observer.onError(e);
            } else {
                RxJavaPlugins.onError(e);

            

Reported by PMD.

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

Line: 18

              
import java.util.concurrent.Callable;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.observers.DeferredScalarDisposable;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;

            

Reported by PMD.

Found 'DU'-anomaly for variable 'value' (lines '46'-'57').
Error

Line: 46

                      }
        T value;
        try {
            value = ExceptionHelper.nullCheck(callable.call(), "Callable returned a null value.");
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            if (!d.isDisposed()) {
                observer.onError(e);
            } else {

            

Reported by PMD.

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

Line: 30

               */
public final class ObservableFromAction<T> extends Observable<T> implements Supplier<T> {

    final Action action;

    public ObservableFromAction(Action action) {
        this.action = action;
    }


            

Reported by PMD.

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

Line: 45

              
            try {
                action.run();
            } catch (Throwable ex) {
                Exceptions.throwIfFatal(ex);
                if (!qs.isDisposed()) {
                    observer.onError(ex);
                } else {
                    RxJavaPlugins.onError(ex);

            

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.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.fuseable.CancellableQueueFuseable;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;


            

Reported by PMD.

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

Line: 18

              
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.fuseable.CancellableQueueFuseable;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;

/**
 * Executes an {@link Action} and signals its exception or completes normally.

            

Reported by PMD.