The following issues were found
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableFlatMapMaybePublisher.java
6 issues
Line: 29
*/
public final class FlowableFlatMapMaybePublisher<T, R> extends Flowable<R> {
final Publisher<T> source;
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final boolean delayErrors;
Reported by PMD.
Line: 31
final Publisher<T> source;
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final boolean delayErrors;
final int maxConcurrency;
Reported by PMD.
Line: 33
final Function<? super T, ? extends MaybeSource<? extends R>> mapper;
final boolean delayErrors;
final int maxConcurrency;
public FlowableFlatMapMaybePublisher(Publisher<T> source, Function<? super T, ? extends MaybeSource<? extends R>> mapper,
boolean delayError, int maxConcurrency) {
Reported by PMD.
Line: 35
final boolean delayErrors;
final int maxConcurrency;
public FlowableFlatMapMaybePublisher(Publisher<T> source, Function<? super T, ? extends MaybeSource<? extends R>> mapper,
boolean delayError, int maxConcurrency) {
this.source = source;
this.mapper = mapper;
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.flowable;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapMaybe.FlatMapMaybeSubscriber;
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.flowable.FlowableFlatMapMaybe.FlatMapMaybeSubscriber;
/**
* Maps upstream values into MaybeSources and merges their signals into one sequence.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableConcatMapEagerPublisher.java
6 issues
Line: 32
*/
public final class FlowableConcatMapEagerPublisher<T, R> extends Flowable<R> {
final Publisher<T> source;
final Function<? super T, ? extends Publisher<? extends R>> mapper;
final int maxConcurrency;
Reported by PMD.
Line: 34
final Publisher<T> source;
final Function<? super T, ? extends Publisher<? extends R>> mapper;
final int maxConcurrency;
final int prefetch;
Reported by PMD.
Line: 36
final Function<? super T, ? extends Publisher<? extends R>> mapper;
final int maxConcurrency;
final int prefetch;
final ErrorMode errorMode;
Reported by PMD.
Line: 38
final int maxConcurrency;
final int prefetch;
final ErrorMode errorMode;
public FlowableConcatMapEagerPublisher(Publisher<T> source,
Function<? super T, ? extends Publisher<? extends R>> mapper,
Reported by PMD.
Line: 40
final int prefetch;
final ErrorMode errorMode;
public FlowableConcatMapEagerPublisher(Publisher<T> source,
Function<? super T, ? extends Publisher<? extends R>> mapper,
int maxConcurrency,
int prefetch,
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.flowable;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMapEager.ConcatMapEagerDelayErrorSubscriber;
import io.reactivex.rxjava3.internal.util.ErrorMode;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableFlatMapSinglePublisher.java
6 issues
Line: 29
*/
public final class FlowableFlatMapSinglePublisher<T, R> extends Flowable<R> {
final Publisher<T> source;
final Function<? super T, ? extends SingleSource<? extends R>> mapper;
final boolean delayErrors;
Reported by PMD.
Line: 31
final Publisher<T> source;
final Function<? super T, ? extends SingleSource<? extends R>> mapper;
final boolean delayErrors;
final int maxConcurrency;
Reported by PMD.
Line: 33
final Function<? super T, ? extends SingleSource<? extends R>> mapper;
final boolean delayErrors;
final int maxConcurrency;
public FlowableFlatMapSinglePublisher(Publisher<T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper,
boolean delayError, int maxConcurrency) {
Reported by PMD.
Line: 35
final boolean delayErrors;
final int maxConcurrency;
public FlowableFlatMapSinglePublisher(Publisher<T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper,
boolean delayError, int maxConcurrency) {
this.source = source;
this.mapper = mapper;
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.flowable;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapSingle.FlatMapSingleSubscriber;
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.flowable.FlowableFlatMapSingle.FlatMapSingleSubscriber;
/**
* Maps upstream values into SingleSources and merges their signals into one sequence.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableFromCompletable.java
6 issues
Line: 31
*/
public final class FlowableFromCompletable<T> extends Flowable<T> implements HasUpstreamCompletableSource {
final CompletableSource source;
public FlowableFromCompletable(CompletableSource source) {
this.source = source;
}
Reported by PMD.
Line: 31
*/
public final class FlowableFromCompletable<T> extends Flowable<T> implements HasUpstreamCompletableSource {
final CompletableSource source;
public FlowableFromCompletable(CompletableSource source) {
this.source = source;
}
Reported by PMD.
Line: 51
extends AbstractEmptyQueueFuseable<T>
implements CompletableObserver {
final Subscriber<? super T> downstream;
Disposable upstream;
public FromCompletableObserver(Subscriber<? super T> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 53
final Subscriber<? super T> downstream;
Disposable upstream;
public FromCompletableObserver(Subscriber<? super T> downstream) {
this.downstream = downstream;
}
Reported by PMD.
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.*;
/**
Reported by PMD.
Line: 21
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.fuseable.*;
/**
* Wrap a Completable into a Flowable.
*
* @param <T> the value type
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableBlockingSubscribe.java
6 issues
Line: 19
import java.util.Objects;
import java.util.concurrent.*;
import org.reactivestreams.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.*;
import io.reactivex.rxjava3.internal.subscribers.*;
import io.reactivex.rxjava3.internal.util.*;
Reported by PMD.
Line: 21
import org.reactivestreams.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.*;
import io.reactivex.rxjava3.internal.subscribers.*;
import io.reactivex.rxjava3.internal.util.*;
/**
Reported by PMD.
Line: 22
import org.reactivestreams.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.*;
import io.reactivex.rxjava3.internal.subscribers.*;
import io.reactivex.rxjava3.internal.util.*;
/**
* Utility methods to consume a Publisher in a blocking manner with callbacks or Subscriber.
Reported by PMD.
Line: 23
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.*;
import io.reactivex.rxjava3.internal.subscribers.*;
import io.reactivex.rxjava3.internal.util.*;
/**
* Utility methods to consume a Publisher in a blocking manner with callbacks or Subscriber.
*/
Reported by PMD.
Line: 24
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.functions.*;
import io.reactivex.rxjava3.internal.subscribers.*;
import io.reactivex.rxjava3.internal.util.*;
/**
* Utility methods to consume a Publisher in a blocking manner with callbacks or Subscriber.
*/
public final class FlowableBlockingSubscribe {
Reported by PMD.
Line: 62
break;
}
BlockingHelper.verifyNonBlocking();
v = queue.take();
}
if (bs.isCancelled()) {
break;
}
if (v == BlockingSubscriber.TERMINATED
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/BlockingFlowableMostRecent.java
6 issues
Line: 32
*/
public final class BlockingFlowableMostRecent<T> implements Iterable<T> {
final Flowable<T> source;
final T initialValue;
public BlockingFlowableMostRecent(Flowable<T> source, T initialValue) {
this.source = source;
Reported by PMD.
Line: 34
final Flowable<T> source;
final T initialValue;
public BlockingFlowableMostRecent(Flowable<T> source, T initialValue) {
this.source = source;
this.initialValue = initialValue;
}
Reported by PMD.
Line: 51
}
static final class MostRecentSubscriber<T> extends DefaultSubscriber<T> {
volatile Object value;
MostRecentSubscriber(T value) {
this.value = NotificationLite.next(value);
}
Reported by PMD.
Line: 85
/**
* buffer to make sure that the state of the iterator doesn't change between calling hasNext() and next().
*/
private Object buf;
@Override
public boolean hasNext() {
buf = value;
return !NotificationLite.isComplete(buf);
Reported by PMD.
Line: 109
return NotificationLite.getValue(buf);
}
finally {
buf = null;
}
}
@Override
public void remove() {
Reported by PMD.
Line: 19
import java.util.*;
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.internal.util.*;
import io.reactivex.rxjava3.subscribers.DefaultSubscriber;
/**
* Returns an Iterable that always returns the item most recently emitted by an Observable, or a
* seed value if no item has yet been emitted.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableOnBackpressureError.java
6 issues
Line: 41
extends AtomicLong implements FlowableSubscriber<T>, Subscription {
private static final long serialVersionUID = -3176480756392482682L;
final Subscriber<? super T> downstream;
Subscription upstream;
boolean done;
BackpressureErrorSubscriber(Subscriber<? super T> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 42
private static final long serialVersionUID = -3176480756392482682L;
final Subscriber<? super T> downstream;
Subscription upstream;
boolean done;
BackpressureErrorSubscriber(Subscriber<? super T> downstream) {
this.downstream = downstream;
}
Reported by PMD.
Line: 43
final Subscriber<? super T> downstream;
Subscription upstream;
boolean done;
BackpressureErrorSubscriber(Subscriber<? super T> downstream) {
this.downstream = downstream;
}
Reported by PMD.
Line: 64
return;
}
long r = get();
if (r != 0L) {
downstream.onNext(t);
BackpressureHelper.produced(this, 1);
} else {
upstream.cancel();
onError(new MissingBackpressureException("could not emit value due to lack of requests"));
Reported by PMD.
Line: 18
import java.util.concurrent.atomic.AtomicLong;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.internal.util.BackpressureHelper;
Reported by PMD.
Line: 20
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.internal.util.BackpressureHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableSkipLast.java
6 issues
Line: 24
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
public final class FlowableSkipLast<T> extends AbstractFlowableWithUpstream<T, T> {
final int skip;
public FlowableSkipLast(Flowable<T> source, int skip) {
super(source);
this.skip = skip;
}
Reported by PMD.
Line: 39
static final class SkipLastSubscriber<T> extends ArrayDeque<T> implements FlowableSubscriber<T>, Subscription {
private static final long serialVersionUID = -3807491841935125653L;
final Subscriber<? super T> downstream;
final int skip;
Subscription upstream;
SkipLastSubscriber(Subscriber<? super T> actual, int skip) {
Reported by PMD.
Line: 40
private static final long serialVersionUID = -3807491841935125653L;
final Subscriber<? super T> downstream;
final int skip;
Subscription upstream;
SkipLastSubscriber(Subscriber<? super T> actual, int skip) {
super(skip);
Reported by PMD.
Line: 42
final Subscriber<? super T> downstream;
final int skip;
Subscription upstream;
SkipLastSubscriber(Subscriber<? super T> actual, int skip) {
super(skip);
this.downstream = actual;
this.skip = skip;
Reported by PMD.
Line: 18
import java.util.ArrayDeque;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
public final class FlowableSkipLast<T> extends AbstractFlowableWithUpstream<T, T> {
Reported by PMD.
Line: 20
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
public final class FlowableSkipLast<T> extends AbstractFlowableWithUpstream<T, T> {
final int skip;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableUnsubscribeOn.java
6 issues
Line: 25
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class FlowableUnsubscribeOn<T> extends AbstractFlowableWithUpstream<T, T> {
final Scheduler scheduler;
public FlowableUnsubscribeOn(Flowable<T> source, Scheduler scheduler) {
super(source);
this.scheduler = scheduler;
}
Reported by PMD.
Line: 40
private static final long serialVersionUID = 1015244841293359600L;
final Subscriber<? super T> downstream;
final Scheduler scheduler;
Subscription upstream;
UnsubscribeSubscriber(Subscriber<? super T> actual, Scheduler scheduler) {
Reported by PMD.
Line: 41
private static final long serialVersionUID = 1015244841293359600L;
final Subscriber<? super T> downstream;
final Scheduler scheduler;
Subscription upstream;
UnsubscribeSubscriber(Subscriber<? super T> actual, Scheduler scheduler) {
this.downstream = actual;
Reported by PMD.
Line: 43
final Subscriber<? super T> downstream;
final Scheduler scheduler;
Subscription upstream;
UnsubscribeSubscriber(Subscriber<? super T> actual, Scheduler scheduler) {
this.downstream = actual;
this.scheduler = scheduler;
}
Reported by PMD.
Line: 18
import java.util.concurrent.atomic.AtomicBoolean;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 20
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class FlowableUnsubscribeOn<T> extends AbstractFlowableWithUpstream<T, T> {
final Scheduler scheduler;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeDoAfterSuccess.java
6 issues
Line: 31
*/
public final class MaybeDoAfterSuccess<T> extends AbstractMaybeWithUpstream<T, T> {
final Consumer<? super T> onAfterSuccess;
public MaybeDoAfterSuccess(MaybeSource<T> source, Consumer<? super T> onAfterSuccess) {
super(source);
this.onAfterSuccess = onAfterSuccess;
}
Reported by PMD.
Line: 45
static final class DoAfterObserver<T> implements MaybeObserver<T>, Disposable {
final MaybeObserver<? super T> downstream;
final Consumer<? super T> onAfterSuccess;
Disposable upstream;
Reported by PMD.
Line: 47
final MaybeObserver<? super T> downstream;
final Consumer<? super T> onAfterSuccess;
Disposable upstream;
DoAfterObserver(MaybeObserver<? super T> actual, Consumer<? super T> onAfterSuccess) {
this.downstream = actual;
Reported by PMD.
Line: 49
final Consumer<? super T> onAfterSuccess;
Disposable upstream;
DoAfterObserver(MaybeObserver<? super T> actual, Consumer<? super T> onAfterSuccess) {
this.downstream = actual;
this.onAfterSuccess = onAfterSuccess;
}
Reported by PMD.
Line: 71
try {
onAfterSuccess.accept(t);
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
// remember, onSuccess is a terminal event and we can't call onError
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.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Consumer;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.