The following issues were found

src/main/java/io/reactivex/rxjava3/internal/util/HalfSerializer.java
2 issues
These nested if statements could be combined
Design

Line: 67

                  public static void onError(Subscriber<?> subscriber, Throwable ex,
            AtomicInteger wip, AtomicThrowable errors) {
        if (errors.tryAddThrowableOrReport(ex)) {
            if (wip.getAndIncrement() == 0) {
                errors.tryTerminateConsumer(subscriber);
            }
        }
    }


            

Reported by PMD.

These nested if statements could be combined
Design

Line: 117

                  public static void onError(Observer<?> observer, Throwable ex,
            AtomicInteger wip, AtomicThrowable errors) {
        if (errors.tryAddThrowableOrReport(ex)) {
            if (wip.getAndIncrement() == 0) {
                errors.tryTerminateConsumer(observer);
            }
        }
    }


            

Reported by PMD.

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

Line: 18

              
import org.reactivestreams.Processor;

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

/**
 * Represents a Subscriber and a Flowable (Publisher) at the same time, allowing
 * multicasting events from a single source to multiple child Subscribers.

            

Reported by PMD.

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

Line: 19

              import org.reactivestreams.Processor;

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

/**
 * Represents a Subscriber and a Flowable (Publisher) at the same time, allowing
 * multicasting events from a single source to multiple child Subscribers.
 * <p>All methods except the onSubscribe, onNext, onError and onComplete are thread-safe.

            

Reported by PMD.

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

Line: 32

               */
public final class FlowableFromRunnable<T> extends Flowable<T> implements Supplier<T> {

    final Runnable run;

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


            

Reported by PMD.

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

Line: 47

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

            

Reported by PMD.

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

Line: 27

               */
public final class ObservableFirstStageObserver<T> extends ObservableStageObserver<T> {

    final boolean hasDefault;

    final T defaultItem;

    public ObservableFirstStageObserver(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: 29

              
    final boolean hasDefault;

    final T defaultItem;

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

            

Reported by PMD.

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

Line: 19

              import io.reactivex.rxjava3.core.*;

public final class SingleFromUnsafeSource<T> extends Single<T> {
    final SingleSource<T> source;

    public SingleFromUnsafeSource(SingleSource<T> source) {
        this.source = source;
    }


            

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.*;

public final class SingleFromUnsafeSource<T> extends Single<T> {
    final SingleSource<T> source;

    public SingleFromUnsafeSource(SingleSource<T> source) {

            

Reported by PMD.

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

Line: 21

              
public final class CompletableError extends Completable {

    final Throwable error;

    public CompletableError(Throwable error) {
        this.error = error;
    }


            

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.internal.disposables.EmptyDisposable;

public final class CompletableError extends Completable {

    final Throwable error;

            

Reported by PMD.

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

Line: 30

               */
final class FlowableWindowSubscribeIntercept<T> extends Flowable<T> {

    final FlowableProcessor<T> window;

    final AtomicBoolean once;

    FlowableWindowSubscribeIntercept(FlowableProcessor<T> source) {
        this.window = source;

            

Reported by PMD.

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

Line: 32

              
    final FlowableProcessor<T> window;

    final AtomicBoolean once;

    FlowableWindowSubscribeIntercept(FlowableProcessor<T> source) {
        this.window = source;
        this.once = new AtomicBoolean();
    }

            

Reported by PMD.

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

Line: 21

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

    final T value;

    public SingleJust(T value) {
        this.value = value;
    }


            

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;

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

    final T value;

            

Reported by PMD.

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

Line: 29

               */
public final class SingleMaterialize<T> extends Single<Notification<T>> {

    final Single<T> source;

    public SingleMaterialize(Single<T> source) {
        this.source = source;
    }


            

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.internal.operators.mixed.MaterializeSingleObserver;

/**
 * Turn the signal types of a Single source into a single Notification of
 * equal kind.

            

Reported by PMD.

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

Line: 26

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

    final Throwable error;

    public MaybeError(Throwable error) {
        this.error = error;
    }


            

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;

/**
 * Signals a constant Throwable.
 *

            

Reported by PMD.