The following issues were found
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeDoFinally.java
6 issues
Line: 33
*/
public final class MaybeDoFinally<T> extends AbstractMaybeWithUpstream<T, T> {
final Action onFinally;
public MaybeDoFinally(MaybeSource<T> source, Action onFinally) {
super(source);
this.onFinally = onFinally;
}
Reported by PMD.
Line: 49
private static final long serialVersionUID = 4109457741734051389L;
final MaybeObserver<? super T> downstream;
final Action onFinally;
Disposable upstream;
Reported by PMD.
Line: 51
final MaybeObserver<? super T> downstream;
final Action onFinally;
Disposable upstream;
DoFinallyObserver(MaybeObserver<? super T> actual, Action onFinally) {
this.downstream = actual;
Reported by PMD.
Line: 53
final Action onFinally;
Disposable upstream;
DoFinallyObserver(MaybeObserver<? super T> actual, Action onFinally) {
this.downstream = actual;
this.onFinally = onFinally;
}
Reported by PMD.
Line: 102
if (compareAndSet(0, 1)) {
try {
onFinally.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(ex);
}
}
}
Reported by PMD.
Line: 18
import java.util.concurrent.atomic.AtomicInteger;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Action;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/observers/SafeSingleObserver.java
6 issues
Line: 34
*/
public final class SafeSingleObserver<T> implements SingleObserver<T> {
final SingleObserver<? super T> downstream;
boolean onSubscribeFailed;
public SafeSingleObserver(SingleObserver<? super T> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 36
final SingleObserver<? super T> downstream;
boolean onSubscribeFailed;
public SafeSingleObserver(SingleObserver<? super T> downstream) {
this.downstream = downstream;
}
Reported by PMD.
Line: 46
public void onSubscribe(@NonNull Disposable d) {
try {
downstream.onSubscribe(d);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
onSubscribeFailed = true;
d.dispose();
RxJavaPlugins.onError(ex);
}
Reported by PMD.
Line: 59
if (!onSubscribeFailed) {
try {
downstream.onSuccess(t);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(ex);
}
}
}
Reported by PMD.
Line: 73
} else {
try {
downstream.onError(e);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(new CompositeException(e, ex));
}
}
}
Reported by PMD.
Line: 19
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.SingleObserver;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
* Wraps another {@link SingleObserver} and catches exceptions thrown by its
* {@code onSubscribe}, {@code onSuccess} or {@code onError} methods despite
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeFromAction.java
6 issues
Line: 29
*/
public final class MaybeFromAction<T> extends Maybe<T> implements Supplier<T> {
final Action action;
public MaybeFromAction(Action action) {
this.action = action;
}
Reported by PMD.
Line: 40
Disposable d = Disposable.empty();
observer.onSubscribe(d);
if (!d.isDisposed()) {
try {
action.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
Reported by PMD.
Line: 44
try {
action.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
if (!d.isDisposed()) {
observer.onError(ex);
} else {
RxJavaPlugins.onError(ex);
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.maybe;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 17
package io.reactivex.rxjava3.internal.operators.maybe;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
Reported by PMD.
Line: 19
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
* Executes an Action and signals its exception or completes normally.
*
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeFromCallable.java
6 issues
Line: 31
*/
public final class MaybeFromCallable<T> extends Maybe<T> implements Supplier<T> {
final Callable<? extends T> callable;
public MaybeFromCallable(Callable<? extends T> callable) {
this.callable = callable;
}
Reported by PMD.
Line: 42
Disposable d = Disposable.empty();
observer.onSubscribe(d);
if (!d.isDisposed()) {
T v;
try {
v = callable.call();
Reported by PMD.
Line: 48
try {
v = callable.call();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
if (!d.isDisposed()) {
observer.onError(ex);
} else {
RxJavaPlugins.onError(ex);
Reported by PMD.
Line: 18
import java.util.concurrent.Callable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 19
import java.util.concurrent.Callable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
Reported by PMD.
Line: 47
T v;
try {
v = callable.call();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
if (!d.isDisposed()) {
observer.onError(ex);
} else {
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeFromSupplier.java
6 issues
Line: 30
*/
public final class MaybeFromSupplier<T> extends Maybe<T> implements Supplier<T> {
final Supplier<? extends T> supplier;
public MaybeFromSupplier(Supplier<? extends T> supplier) {
this.supplier = supplier;
}
Reported by PMD.
Line: 41
Disposable d = Disposable.empty();
observer.onSubscribe(d);
if (!d.isDisposed()) {
T v;
try {
v = supplier.get();
Reported by PMD.
Line: 47
try {
v = supplier.get();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
if (!d.isDisposed()) {
observer.onError(ex);
} else {
RxJavaPlugins.onError(ex);
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.maybe;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 17
package io.reactivex.rxjava3.internal.operators.maybe;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
Reported by PMD.
Line: 46
T v;
try {
v = supplier.get();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
if (!d.isDisposed()) {
observer.onError(ex);
} else {
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeIsEmptySingle.java
6 issues
Line: 31
public final class MaybeIsEmptySingle<T> extends Single<Boolean>
implements HasUpstreamMaybeSource<T>, FuseToMaybe<Boolean> {
final MaybeSource<T> source;
public MaybeIsEmptySingle(MaybeSource<T> source) {
this.source = source;
}
Reported by PMD.
Line: 31
public final class MaybeIsEmptySingle<T> extends Single<Boolean>
implements HasUpstreamMaybeSource<T>, FuseToMaybe<Boolean> {
final MaybeSource<T> source;
public MaybeIsEmptySingle(MaybeSource<T> source) {
this.source = source;
}
Reported by PMD.
Line: 55
static final class IsEmptyMaybeObserver<T>
implements MaybeObserver<T>, Disposable {
final SingleObserver<? super Boolean> downstream;
Disposable upstream;
IsEmptyMaybeObserver(SingleObserver<? super Boolean> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 57
final SingleObserver<? super Boolean> downstream;
Disposable upstream;
IsEmptyMaybeObserver(SingleObserver<? super Boolean> downstream) {
this.downstream = downstream;
}
Reported by PMD.
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.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 19
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.fuseable.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
* Signals true if the source Maybe signals onComplete, signals false if the source Maybe
* signals onSuccess.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/observers/SafeCompletableObserver.java
6 issues
Line: 33
*/
public final class SafeCompletableObserver implements CompletableObserver {
final CompletableObserver downstream;
boolean onSubscribeFailed;
public SafeCompletableObserver(CompletableObserver downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 35
final CompletableObserver downstream;
boolean onSubscribeFailed;
public SafeCompletableObserver(CompletableObserver downstream) {
this.downstream = downstream;
}
Reported by PMD.
Line: 45
public void onSubscribe(@NonNull Disposable d) {
try {
downstream.onSubscribe(d);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
onSubscribeFailed = true;
d.dispose();
RxJavaPlugins.onError(ex);
}
Reported by PMD.
Line: 60
} else {
try {
downstream.onError(e);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(new CompositeException(e, ex));
}
}
}
Reported by PMD.
Line: 72
if (!onSubscribeFailed) {
try {
downstream.onComplete();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(ex);
}
}
}
Reported by PMD.
Line: 19
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.CompletableObserver;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
/**
* Wraps another {@link CompletableObserver} and catches exceptions thrown by its
* {@code onSubscribe}, {@code onError} or
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeTakeUntilPublisher.java
6 issues
Line: 35
*/
public final class MaybeTakeUntilPublisher<T, U> extends AbstractMaybeWithUpstream<T, T> {
final Publisher<U> other;
public MaybeTakeUntilPublisher(MaybeSource<T> source, Publisher<U> other) {
super(source);
this.other = other;
}
Reported by PMD.
Line: 57
private static final long serialVersionUID = -2187421758664251153L;
final MaybeObserver<? super T> downstream;
final TakeUntilOtherMaybeObserver<U> other;
TakeUntilMainMaybeObserver(MaybeObserver<? super T> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 59
final MaybeObserver<? super T> downstream;
final TakeUntilOtherMaybeObserver<U> other;
TakeUntilMainMaybeObserver(MaybeObserver<? super T> downstream) {
this.downstream = downstream;
this.other = new TakeUntilOtherMaybeObserver<>(this);
}
Reported by PMD.
Line: 127
private static final long serialVersionUID = -1266041316834525931L;
final TakeUntilMainMaybeObserver<?, U> parent;
TakeUntilOtherMaybeObserver(TakeUntilMainMaybeObserver<?, U> parent) {
this.parent = parent;
}
Reported by PMD.
Line: 18
import java.util.concurrent.atomic.AtomicReference;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
Reported by PMD.
Line: 20
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/mixed/CompletableAndThenObservable.java
6 issues
Line: 31
*/
public final class CompletableAndThenObservable<R> extends Observable<R> {
final CompletableSource source;
final ObservableSource<? extends R> other;
public CompletableAndThenObservable(CompletableSource source,
ObservableSource<? extends R> other) {
Reported by PMD.
Line: 33
final CompletableSource source;
final ObservableSource<? extends R> other;
public CompletableAndThenObservable(CompletableSource source,
ObservableSource<? extends R> other) {
this.source = source;
this.other = other;
Reported by PMD.
Line: 54
private static final long serialVersionUID = -8948264376121066672L;
final Observer<? super R> downstream;
ObservableSource<? extends R> other;
AndThenObservableObserver(Observer<? super R> downstream, ObservableSource<? extends R> other) {
this.other = other;
Reported by PMD.
Line: 56
final Observer<? super R> downstream;
ObservableSource<? extends R> other;
AndThenObservableObserver(Observer<? super R> downstream, ObservableSource<? extends R> other) {
this.other = other;
this.downstream = downstream;
}
Reported by PMD.
Line: 79
if (o == null) {
downstream.onComplete();
} else {
other = null;
o.subscribe(this);
}
}
@Override
Reported by PMD.
Line: 18
import java.util.concurrent.atomic.AtomicReference;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
/**
* After Completable completes, it relays the signals
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/mixed/FlowableConcatMapMaybePublisher.java
6 issues
Line: 34
*/
public final class FlowableConcatMapMaybePublisher<T, R> extends Flowable<R> {
final Publisher<T> source;
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final ErrorMode errorMode;
Reported by PMD.
Line: 36
final Publisher<T> source;
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final ErrorMode errorMode;
final int prefetch;
Reported by PMD.
Line: 38
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final ErrorMode errorMode;
final int prefetch;
public FlowableConcatMapMaybePublisher(Publisher<T> source,
Function<? super T, ? extends MaybeSource<? extends R>> mapper,
Reported by PMD.
Line: 40
final ErrorMode errorMode;
final int prefetch;
public FlowableConcatMapMaybePublisher(Publisher<T> source,
Function<? super T, ? extends MaybeSource<? extends R>> mapper,
ErrorMode errorMode, int prefetch) {
this.source = source;
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.mixed;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybe.ConcatMapMaybeSubscriber;
import io.reactivex.rxjava3.internal.util.ErrorMode;
Reported by PMD.
Line: 18
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybe.ConcatMapMaybeSubscriber;
import io.reactivex.rxjava3.internal.util.ErrorMode;
/**
Reported by PMD.