The following issues were found
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableTimer.java
8 issues
Line: 28
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
public final class FlowableTimer extends Flowable<Long> {
final Scheduler scheduler;
final long delay;
final TimeUnit unit;
public FlowableTimer(long delay, TimeUnit unit, Scheduler scheduler) {
this.delay = delay;
this.unit = unit;
Reported by PMD.
Line: 29
public final class FlowableTimer extends Flowable<Long> {
final Scheduler scheduler;
final long delay;
final TimeUnit unit;
public FlowableTimer(long delay, TimeUnit unit, Scheduler scheduler) {
this.delay = delay;
this.unit = unit;
this.scheduler = scheduler;
Reported by PMD.
Line: 30
public final class FlowableTimer extends Flowable<Long> {
final Scheduler scheduler;
final long delay;
final TimeUnit unit;
public FlowableTimer(long delay, TimeUnit unit, Scheduler scheduler) {
this.delay = delay;
this.unit = unit;
this.scheduler = scheduler;
}
Reported by PMD.
Line: 52
private static final long serialVersionUID = -2809475196591179431L;
final Subscriber<? super Long> downstream;
volatile boolean requested;
TimerSubscriber(Subscriber<? super Long> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 54
final Subscriber<? super Long> downstream;
volatile boolean requested;
TimerSubscriber(Subscriber<? super Long> downstream) {
this.downstream = downstream;
}
Reported by PMD.
Line: 19
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import io.reactivex.rxjava3.internal.disposables.*;
Reported by PMD.
Line: 21
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import io.reactivex.rxjava3.internal.disposables.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
Reported by PMD.
Line: 24
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import io.reactivex.rxjava3.internal.disposables.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
public final class FlowableTimer extends Flowable<Long> {
final Scheduler scheduler;
final long delay;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableToList.java
8 issues
Line: 27
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
public final class FlowableToList<T, U extends Collection<? super T>> extends AbstractFlowableWithUpstream<T, U> {
final Supplier<U> collectionSupplier;
public FlowableToList(Flowable<T> source, Supplier<U> collectionSupplier) {
super(source);
this.collectionSupplier = collectionSupplier;
}
Reported by PMD.
Line: 39
U coll;
try {
coll = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
EmptySubscription.error(e, s);
return;
}
source.subscribe(new ToListSubscriber<>(s, coll));
Reported by PMD.
Line: 52
implements FlowableSubscriber<T>, Subscription {
private static final long serialVersionUID = -8134157938864266736L;
Subscription upstream;
ToListSubscriber(Subscriber<? super U> actual, U collection) {
super(actual);
this.value = collection;
}
Reported by PMD.
Line: 78
@Override
public void onError(Throwable t) {
value = null;
downstream.onError(t);
}
@Override
public void onComplete() {
Reported by PMD.
Line: 18
import java.util.Collection;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.subscriptions.*;
Reported by PMD.
Line: 20
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.subscriptions.*;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
Reported by PMD.
Line: 23
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.subscriptions.*;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
public final class FlowableToList<T, U extends Collection<? super T>> extends AbstractFlowableWithUpstream<T, U> {
final Supplier<U> collectionSupplier;
Reported by PMD.
Line: 38
protected void subscribeActual(Subscriber<? super U> s) {
U coll;
try {
coll = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
EmptySubscription.error(e, s);
return;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableTakeUntilPredicate.java
8 issues
Line: 24
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class ObservableTakeUntilPredicate<T> extends AbstractObservableWithUpstream<T, T> {
final Predicate<? super T> predicate;
public ObservableTakeUntilPredicate(ObservableSource<T> source, Predicate<? super T> predicate) {
super(source);
this.predicate = predicate;
}
Reported by PMD.
Line: 36
}
static final class TakeUntilPredicateObserver<T> implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
boolean done;
TakeUntilPredicateObserver(Observer<? super T> downstream, Predicate<? super T> predicate) {
this.downstream = downstream;
Reported by PMD.
Line: 37
static final class TakeUntilPredicateObserver<T> implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
boolean done;
TakeUntilPredicateObserver(Observer<? super T> downstream, Predicate<? super T> predicate) {
this.downstream = downstream;
this.predicate = predicate;
Reported by PMD.
Line: 38
static final class TakeUntilPredicateObserver<T> implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
boolean done;
TakeUntilPredicateObserver(Observer<? super T> downstream, Predicate<? super T> predicate) {
this.downstream = downstream;
this.predicate = predicate;
}
Reported by PMD.
Line: 39
final Observer<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
boolean done;
TakeUntilPredicateObserver(Observer<? super T> downstream, Predicate<? super T> predicate) {
this.downstream = downstream;
this.predicate = predicate;
}
Reported by PMD.
Line: 70
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.dispose();
onError(e);
return;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.observable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 69
downstream.onNext(t);
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.dispose();
onError(e);
return;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableElementAtMaybe.java
8 issues
Line: 23
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class ObservableElementAtMaybe<T> extends Maybe<T> implements FuseToObservable<T> {
final ObservableSource<T> source;
final long index;
public ObservableElementAtMaybe(ObservableSource<T> source, long index) {
this.source = source;
this.index = index;
}
Reported by PMD.
Line: 24
public final class ObservableElementAtMaybe<T> extends Maybe<T> implements FuseToObservable<T> {
final ObservableSource<T> source;
final long index;
public ObservableElementAtMaybe(ObservableSource<T> source, long index) {
this.source = source;
this.index = index;
}
Reported by PMD.
Line: 41
}
static final class ElementAtObserver<T> implements Observer<T>, Disposable {
final MaybeObserver<? super T> downstream;
final long index;
Disposable upstream;
long count;
Reported by PMD.
Line: 42
static final class ElementAtObserver<T> implements Observer<T>, Disposable {
final MaybeObserver<? super T> downstream;
final long index;
Disposable upstream;
long count;
Reported by PMD.
Line: 44
final MaybeObserver<? super T> downstream;
final long index;
Disposable upstream;
long count;
boolean done;
Reported by PMD.
Line: 46
Disposable upstream;
long count;
boolean done;
ElementAtObserver(MaybeObserver<? super T> actual, long index) {
this.downstream = actual;
Reported by PMD.
Line: 48
long count;
boolean done;
ElementAtObserver(MaybeObserver<? super T> actual, long index) {
this.downstream = actual;
this.index = index;
}
Reported by PMD.
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;
import io.reactivex.rxjava3.internal.fuseable.FuseToObservable;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleDelayWithPublisher.java
8 issues
Line: 29
public final class SingleDelayWithPublisher<T, U> extends Single<T> {
final SingleSource<T> source;
final Publisher<U> other;
public SingleDelayWithPublisher(SingleSource<T> source, Publisher<U> other) {
this.source = source;
Reported by PMD.
Line: 31
final SingleSource<T> source;
final Publisher<U> other;
public SingleDelayWithPublisher(SingleSource<T> source, Publisher<U> other) {
this.source = source;
this.other = other;
}
Reported by PMD.
Line: 49
private static final long serialVersionUID = -8565274649390031272L;
final SingleObserver<? super T> downstream;
final SingleSource<T> source;
boolean done;
Reported by PMD.
Line: 51
final SingleObserver<? super T> downstream;
final SingleSource<T> source;
boolean done;
Subscription upstream;
Reported by PMD.
Line: 53
final SingleSource<T> source;
boolean done;
Subscription upstream;
OtherSubscriber(SingleObserver<? super T> actual, SingleSource<T> source) {
this.downstream = actual;
Reported by PMD.
Line: 55
boolean done;
Subscription upstream;
OtherSubscriber(SingleObserver<? super T> actual, SingleSource<T> source) {
this.downstream = actual;
this.source = source;
}
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.observers.ResumeSingleObserver;
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.observers.ResumeSingleObserver;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleDoOnTerminate.java
8 issues
Line: 64
}
@Override
public void onError(Throwable e) {
try {
onTerminate.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
e = new CompositeException(e, ex);
Reported by PMD.
Line: 23
public final class SingleDoOnTerminate<T> extends Single<T> {
final SingleSource<T> source;
final Action onTerminate;
public SingleDoOnTerminate(SingleSource<T> source, Action onTerminate) {
this.source = source;
Reported by PMD.
Line: 25
final SingleSource<T> source;
final Action onTerminate;
public SingleDoOnTerminate(SingleSource<T> source, Action onTerminate) {
this.source = source;
this.onTerminate = onTerminate;
}
Reported by PMD.
Line: 39
final class DoOnTerminate implements SingleObserver<T> {
final SingleObserver<? super T> downstream;
DoOnTerminate(SingleObserver<? super T> observer) {
this.downstream = observer;
}
Reported by PMD.
Line: 54
public void onSuccess(T value) {
try {
onTerminate.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(ex);
return;
}
Reported by PMD.
Line: 67
public void onError(Throwable e) {
try {
onTerminate.run();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
e = new CompositeException(e, ex);
}
downstream.onError(e);
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.single;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.Action;
public final class SingleDoOnTerminate<T> extends Single<T> {
Reported by PMD.
Line: 18
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.Action;
public final class SingleDoOnTerminate<T> extends Single<T> {
final SingleSource<T> source;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeFilter.java
8 issues
Line: 30
*/
public final class MaybeFilter<T> extends AbstractMaybeWithUpstream<T, T> {
final Predicate<? super T> predicate;
public MaybeFilter(MaybeSource<T> source, Predicate<? super T> predicate) {
super(source);
this.predicate = predicate;
}
Reported by PMD.
Line: 44
static final class FilterMaybeObserver<T> implements MaybeObserver<T>, Disposable {
final MaybeObserver<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
Reported by PMD.
Line: 46
final MaybeObserver<? super T> downstream;
final Predicate<? super T> predicate;
Disposable upstream;
FilterMaybeObserver(MaybeObserver<? super T> actual, Predicate<? super T> predicate) {
this.downstream = actual;
Reported by PMD.
Line: 48
final Predicate<? super T> predicate;
Disposable upstream;
FilterMaybeObserver(MaybeObserver<? super T> actual, Predicate<? super T> predicate) {
this.downstream = actual;
this.predicate = predicate;
}
Reported by PMD.
Line: 59
public void dispose() {
Disposable d = this.upstream;
this.upstream = DisposableHelper.DISPOSED;
d.dispose();
}
@Override
public boolean isDisposed() {
return upstream.isDisposed();
Reported by PMD.
Line: 82
try {
b = predicate.test(value);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(ex);
return;
}
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.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
Reported by PMD.
Line: 81
boolean b;
try {
b = predicate.test(value);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(ex);
return;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableElementAtMaybe.java
8 issues
Line: 25
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class FlowableElementAtMaybe<T> extends Maybe<T> implements FuseToFlowable<T> {
final Flowable<T> source;
final long index;
public FlowableElementAtMaybe(Flowable<T> source, long index) {
this.source = source;
Reported by PMD.
Line: 27
public final class FlowableElementAtMaybe<T> extends Maybe<T> implements FuseToFlowable<T> {
final Flowable<T> source;
final long index;
public FlowableElementAtMaybe(Flowable<T> source, long index) {
this.source = source;
this.index = index;
}
Reported by PMD.
Line: 46
static final class ElementAtSubscriber<T> implements FlowableSubscriber<T>, Disposable {
final MaybeObserver<? super T> downstream;
final long index;
Subscription upstream;
Reported by PMD.
Line: 48
final MaybeObserver<? super T> downstream;
final long index;
Subscription upstream;
long count;
Reported by PMD.
Line: 50
final long index;
Subscription upstream;
long count;
boolean done;
Reported by PMD.
Line: 52
Subscription upstream;
long count;
boolean done;
ElementAtSubscriber(MaybeObserver<? super T> actual, long index) {
this.downstream = actual;
Reported by PMD.
Line: 54
long count;
boolean done;
ElementAtSubscriber(MaybeObserver<? super T> actual, long index) {
this.downstream = actual;
this.index = index;
}
Reported by PMD.
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/maybe/MaybeObserveOn.java
8 issues
Line: 29
*/
public final class MaybeObserveOn<T> extends AbstractMaybeWithUpstream<T, T> {
final Scheduler scheduler;
public MaybeObserveOn(MaybeSource<T> source, Scheduler scheduler) {
super(source);
this.scheduler = scheduler;
}
Reported by PMD.
Line: 47
private static final long serialVersionUID = 8571289934935992137L;
final MaybeObserver<? super T> downstream;
final Scheduler scheduler;
T value;
Throwable error;
Reported by PMD.
Line: 49
final MaybeObserver<? super T> downstream;
final Scheduler scheduler;
T value;
Throwable error;
ObserveOnMaybeObserver(MaybeObserver<? super T> actual, Scheduler scheduler) {
Reported by PMD.
Line: 51
final Scheduler scheduler;
T value;
Throwable error;
ObserveOnMaybeObserver(MaybeObserver<? super T> actual, Scheduler scheduler) {
this.downstream = actual;
this.scheduler = scheduler;
Reported by PMD.
Line: 52
final Scheduler scheduler;
T value;
Throwable error;
ObserveOnMaybeObserver(MaybeObserver<? super T> actual, Scheduler scheduler) {
this.downstream = actual;
this.scheduler = scheduler;
}
Reported by PMD.
Line: 97
public void run() {
Throwable ex = error;
if (ex != null) {
error = null;
downstream.onError(ex);
} else {
T v = value;
if (v != null) {
value = null;
Reported by PMD.
Line: 102
} else {
T v = value;
if (v != null) {
value = null;
downstream.onSuccess(v);
} else {
downstream.onComplete();
}
}
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;
/**
* Signals the onSuccess, onError or onComplete events on a the specific scheduler.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableOnErrorComplete.java
8 issues
Line: 31
*/
public final class ObservableOnErrorComplete<T> extends AbstractObservableWithUpstream<T, T> {
final Predicate<? super Throwable> predicate;
public ObservableOnErrorComplete(ObservableSource<T> source,
Predicate<? super Throwable> predicate) {
super(source);
this.predicate = predicate;
Reported by PMD.
Line: 47
public static final class OnErrorCompleteObserver<T>
implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final Predicate<? super Throwable> predicate;
Disposable upstream;
Reported by PMD.
Line: 49
final Observer<? super T> downstream;
final Predicate<? super Throwable> predicate;
Disposable upstream;
public OnErrorCompleteObserver(Observer<? super T> actual, Predicate<? super Throwable> predicate) {
this.downstream = actual;
Reported by PMD.
Line: 51
final Predicate<? super Throwable> predicate;
Disposable upstream;
public OnErrorCompleteObserver(Observer<? super T> actual, Predicate<? super Throwable> predicate) {
this.downstream = actual;
this.predicate = predicate;
}
Reported by PMD.
Line: 78
try {
b = predicate.test(e);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(new CompositeException(e, ex));
return;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.observable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
Reported by PMD.
Line: 18
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
/**
* Emits an onComplete if the source emits an onError and the predicate returns true for
Reported by PMD.
Line: 77
boolean b;
try {
b = predicate.test(e);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(new CompositeException(e, ex));
return;
}
Reported by PMD.