The following issues were found

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

Line: 25

               */
public final class CompletableHide extends Completable {

    final CompletableSource source;

    public CompletableHide(CompletableSource source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 38

              
    static final class HideCompletableObserver implements CompletableObserver, Disposable {

        final CompletableObserver downstream;

        Disposable upstream;

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

            

Reported by PMD.

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

Line: 40

              
        final CompletableObserver downstream;

        Disposable upstream;

        HideCompletableObserver(CompletableObserver 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.completable;

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

/**
 * Hides the identity of the upstream Completable and its Disposable sent through onSubscribe.

            

Reported by PMD.

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

Line: 40

              
    static final class HideSubscriber<T> implements FlowableSubscriber<T>, Subscription {

        final Subscriber<? super T> downstream;

        Subscription upstream;

        HideSubscriber(Subscriber<? super T> downstream) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 42

              
        final Subscriber<? super T> downstream;

        Subscription upstream;

        HideSubscriber(Subscriber<? super T> downstream) {
            this.downstream = downstream;
        }


            

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.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;

/**

            

Reported by PMD.

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

Line: 18

              
import org.reactivestreams.*;

import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;

/**
 * Hides the identity of the wrapped Flowable and its Subscription.
 * @param <T> the value type

            

Reported by PMD.

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

Line: 29

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

    final Publisher<T> source;

    final Function<? super T, ? extends CompletableSource> mapper;

    final boolean delayErrors;


            

Reported by PMD.

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

Line: 31

              
    final Publisher<T> source;

    final Function<? super T, ? extends CompletableSource> mapper;

    final boolean delayErrors;

    public FlowableSwitchMapCompletablePublisher(Publisher<T> source,
            Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors) {

            

Reported by PMD.

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

Line: 33

              
    final Function<? super T, ? extends CompletableSource> mapper;

    final boolean delayErrors;

    public FlowableSwitchMapCompletablePublisher(Publisher<T> source,
            Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors) {
        this.source = source;
        this.mapper = mapper;

            

Reported by PMD.

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

Line: 18

              
import org.reactivestreams.Publisher;

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

/**
 * Switch between subsequent {@link CompletableSource}s emitted by a {@link Publisher}.
 * Reuses {@link FlowableSwitchMapCompletable} internals.

            

Reported by PMD.

src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeToObservable.java
4 issues
Field source has the same name as a method
Error

Line: 30

               */
public final class MaybeToObservable<T> extends Observable<T> implements HasUpstreamMaybeSource<T> {

    final MaybeSource<T> source;

    public MaybeToObservable(MaybeSource<T> source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 30

               */
public final class MaybeToObservable<T> extends Observable<T> implements HasUpstreamMaybeSource<T> {

    final MaybeSource<T> source;

    public MaybeToObservable(MaybeSource<T> source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 63

              
        private static final long serialVersionUID = 7603343402964826922L;

        Disposable upstream;

        MaybeToObservableObserver(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.maybe;

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


            

Reported by PMD.

src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeToFlowable.java
4 issues
Field source has the same name as a method
Error

Line: 32

               */
public final class MaybeToFlowable<T> extends Flowable<T> implements HasUpstreamMaybeSource<T> {

    final MaybeSource<T> source;

    public MaybeToFlowable(MaybeSource<T> source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 32

               */
public final class MaybeToFlowable<T> extends Flowable<T> implements HasUpstreamMaybeSource<T> {

    final MaybeSource<T> source;

    public MaybeToFlowable(MaybeSource<T> source) {
        this.source = source;
    }


            

Reported by PMD.

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

Line: 53

              
        private static final long serialVersionUID = 7603343402964826922L;

        Disposable upstream;

        MaybeToFlowableSubscriber(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.fuseable.HasUpstreamMaybeSource;
import io.reactivex.rxjava3.internal.subscriptions.DeferredScalarSubscription;


            

Reported by PMD.

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

Line: 31

                  }

    static final class IgnoreObservable<T> implements Observer<T>, Disposable {
        final Observer<? super T> downstream;

        Disposable upstream;

        IgnoreObservable(Observer<? super T> t) {
            this.downstream = t;

            

Reported by PMD.

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

Line: 33

                  static final class IgnoreObservable<T> implements Observer<T>, Disposable {
        final Observer<? super T> downstream;

        Disposable upstream;

        IgnoreObservable(Observer<? super T> t) {
            this.downstream = t;
        }


            

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;

public final class ObservableIgnoreElements<T> extends AbstractObservableWithUpstream<T, T> {

    public ObservableIgnoreElements(ObservableSource<T> source) {

            

Reported by PMD.

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

Line: 39

              
    static final class HideDisposable<T> implements Observer<T>, Disposable {

        final Observer<? super T> downstream;

        Disposable upstream;

        HideDisposable(Observer<? super T> downstream) {
            this.downstream = downstream;

            

Reported by PMD.

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

Line: 41

              
        final Observer<? super T> downstream;

        Disposable upstream;

        HideDisposable(Observer<? 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.observable;

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

/**
 * Hides the identity of the wrapped ObservableSource and its Disposable.

            

Reported by PMD.

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

Line: 30

               */
public final class FlowableSingleStageSubscriber<T> extends FlowableStageSubscriber<T> {

    final boolean hasDefault;

    final T defaultItem;

    public FlowableSingleStageSubscriber(boolean hasDefault, T defaultItem) {
        this.hasDefault = hasDefault;

            

Reported by PMD.

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

Line: 32

              
    final boolean hasDefault;

    final T defaultItem;

    public FlowableSingleStageSubscriber(boolean hasDefault, T defaultItem) {
        this.hasDefault = hasDefault;
        this.defaultItem = defaultItem;
    }

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 42

                  @Override
    public void onNext(T t) {
        if (value != null) {
            value = null;
            completeExceptionally(new IllegalArgumentException("Sequence contains more than one element!"));
        } else {
            value = t;
        }
    }

            

Reported by PMD.

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

Line: 30

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

    final Runnable run;

    public ObservableFromRunnable(Runnable run) {
        this.run = run;
    }


            

Reported by PMD.

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

Line: 45

              
            try {
                run.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.Supplier;
import io.reactivex.rxjava3.internal.fuseable.CancellableQueueFuseable;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;


            

Reported by PMD.

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

Line: 34

               */
abstract class FlowableStageSubscriber<T> extends CompletableFuture<T> implements FlowableSubscriber<T> {

    final AtomicReference<Subscription> upstream = new AtomicReference<>();

    T value;

    @Override
    public final void onSubscribe(@NonNull Subscription s) {

            

Reported by PMD.

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

Line: 36

              
    final AtomicReference<Subscription> upstream = new AtomicReference<>();

    T value;

    @Override
    public final void onSubscribe(@NonNull Subscription s) {
        if (SubscriptionHelper.setOnce(upstream, s)) {
            afterSubscribe(s);

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 60

                  }

    protected final void clear() {
        value = null;
        upstream.lazySet(SubscriptionHelper.CANCELLED);
    }

    @Override
    public final boolean cancel(boolean mayInterruptIfRunning) {

            

Reported by PMD.