The following issues were found
src/main/java/io/reactivex/rxjava3/internal/observers/AbstractDisposableAutoRelease.java
10 issues
Line: 54
private static final long serialVersionUID = 8924480688481408726L;
final AtomicReference<DisposableContainer> composite;
final Consumer<? super Throwable> onError;
final Action onComplete;
Reported by PMD.
Line: 56
final AtomicReference<DisposableContainer> composite;
final Consumer<? super Throwable> onError;
final Action onComplete;
AbstractDisposableAutoRelease(
DisposableContainer composite,
Reported by PMD.
Line: 56
final AtomicReference<DisposableContainer> composite;
final Consumer<? super Throwable> onError;
final Action onComplete;
AbstractDisposableAutoRelease(
DisposableContainer composite,
Reported by PMD.
Line: 58
final Consumer<? super Throwable> onError;
final Action onComplete;
AbstractDisposableAutoRelease(
DisposableContainer composite,
Consumer<? super Throwable> onError,
Action onComplete
Reported by PMD.
Line: 58
final Consumer<? super Throwable> onError;
final Action onComplete;
AbstractDisposableAutoRelease(
DisposableContainer composite,
Consumer<? super Throwable> onError,
Action onComplete
Reported by PMD.
Line: 75
lazySet(DisposableHelper.DISPOSED);
try {
onError.accept(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(new CompositeException(t, e));
}
} else {
RxJavaPlugins.onError(t);
Reported by PMD.
Line: 90
lazySet(DisposableHelper.DISPOSED);
try {
onComplete.run();
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(e);
}
}
removeSelf();
Reported by PMD.
Line: 34
import java.util.concurrent.atomic.AtomicReference;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.observers.LambdaConsumerIntrospection;
Reported by PMD.
Line: 35
import java.util.concurrent.atomic.AtomicReference;
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.observers.LambdaConsumerIntrospection;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 36
import io.reactivex.rxjava3.disposables.*;
import io.reactivex.rxjava3.exceptions.*;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.observers.LambdaConsumerIntrospection;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/jdk8/SingleMapOptional.java
10 issues
Line: 33
*/
public final class SingleMapOptional<T, R> extends Maybe<R> {
final Single<T> source;
final Function<? super T, Optional<? extends R>> mapper;
public SingleMapOptional(Single<T> source, Function<? super T, Optional<? extends R>> mapper) {
this.source = source;
Reported by PMD.
Line: 35
final Single<T> source;
final Function<? super T, Optional<? extends R>> mapper;
public SingleMapOptional(Single<T> source, Function<? super T, Optional<? extends R>> mapper) {
this.source = source;
this.mapper = mapper;
}
Reported by PMD.
Line: 49
static final class MapOptionalSingleObserver<T, R> implements SingleObserver<T>, Disposable {
final MaybeObserver<? super R> downstream;
final Function<? super T, Optional<? extends R>> mapper;
Disposable upstream;
Reported by PMD.
Line: 51
final MaybeObserver<? super R> downstream;
final Function<? super T, Optional<? extends R>> mapper;
Disposable upstream;
MapOptionalSingleObserver(MaybeObserver<? super R> downstream, Function<? super T, Optional<? extends R>> mapper) {
this.downstream = downstream;
Reported by PMD.
Line: 53
final Function<? super T, Optional<? extends R>> mapper;
Disposable upstream;
MapOptionalSingleObserver(MaybeObserver<? super R> downstream, Function<? super T, Optional<? extends R>> mapper) {
this.downstream = downstream;
this.mapper = mapper;
}
Reported by PMD.
Line: 64
public void dispose() {
Disposable d = this.upstream;
this.upstream = DisposableHelper.DISPOSED;
d.dispose();
}
@Override
public boolean isDisposed() {
return upstream.isDisposed();
Reported by PMD.
Line: 87
try {
v = Objects.requireNonNull(mapper.apply(value), "The mapper returned a null item");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(ex);
return;
}
Reported by PMD.
Line: 93
return;
}
if (v.isPresent()) {
downstream.onSuccess(v.get());
} else {
downstream.onComplete();
}
}
Reported by PMD.
Line: 18
import java.util.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
Reported by PMD.
Line: 86
Optional<? extends R> v;
try {
v = Objects.requireNonNull(mapper.apply(value), "The mapper returned a null item");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(ex);
return;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableToList.java
10 issues
Line: 28
public final class ObservableToList<T, U extends Collection<? super T>>
extends AbstractObservableWithUpstream<T, U> {
final Supplier<U> collectionSupplier;
public ObservableToList(ObservableSource<T> source, Supplier<U> collectionSupplier) {
super(source);
this.collectionSupplier = collectionSupplier;
}
Reported by PMD.
Line: 40
U coll;
try {
coll = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
EmptyDisposable.error(e, t);
return;
}
source.subscribe(new ToListObserver<>(t, coll));
Reported by PMD.
Line: 49
}
static final class ToListObserver<T, U extends Collection<? super T>> implements Observer<T>, Disposable {
final Observer<? super U> downstream;
Disposable upstream;
U collection;
Reported by PMD.
Line: 51
static final class ToListObserver<T, U extends Collection<? super T>> implements Observer<T>, Disposable {
final Observer<? super U> downstream;
Disposable upstream;
U collection;
ToListObserver(Observer<? super U> actual, U collection) {
this.downstream = actual;
Reported by PMD.
Line: 53
Disposable upstream;
U collection;
ToListObserver(Observer<? super U> actual, U collection) {
this.downstream = actual;
this.collection = collection;
}
Reported by PMD.
Line: 85
@Override
public void onError(Throwable t) {
collection = null;
downstream.onError(t);
}
@Override
public void onComplete() {
Reported by PMD.
Line: 92
@Override
public void onComplete() {
U c = collection;
collection = null;
downstream.onNext(c);
downstream.onComplete();
}
}
}
Reported by PMD.
Line: 18
import java.util.Collection;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.disposables.*;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
Reported by PMD.
Line: 22
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Supplier;
import io.reactivex.rxjava3.internal.disposables.*;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
public final class ObservableToList<T, U extends Collection<? super T>>
extends AbstractObservableWithUpstream<T, U> {
Reported by PMD.
Line: 39
public void subscribeActual(Observer<? super U> t) {
U coll;
try {
coll = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
EmptyDisposable.error(e, t);
return;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableDistinct.java
10 issues
Line: 30
public final class ObservableDistinct<T, K> extends AbstractObservableWithUpstream<T, T> {
final Function<? super T, K> keySelector;
final Supplier<? extends Collection<? super K>> collectionSupplier;
public ObservableDistinct(ObservableSource<T> source, Function<? super T, K> keySelector, Supplier<? extends Collection<? super K>> collectionSupplier) {
super(source);
Reported by PMD.
Line: 32
final Function<? super T, K> keySelector;
final Supplier<? extends Collection<? super K>> collectionSupplier;
public ObservableDistinct(ObservableSource<T> source, Function<? super T, K> keySelector, Supplier<? extends Collection<? super K>> collectionSupplier) {
super(source);
this.keySelector = keySelector;
this.collectionSupplier = collectionSupplier;
Reported by PMD.
Line: 46
try {
collection = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, observer);
return;
}
Reported by PMD.
Line: 57
static final class DistinctObserver<T, K> extends BasicFuseableObserver<T, T> {
final Collection<? super K> collection;
final Function<? super T, K> keySelector;
DistinctObserver(Observer<? super T> actual, Function<? super T, K> keySelector, Collection<? super K> collection) {
super(actual);
Reported by PMD.
Line: 59
final Collection<? super K> collection;
final Function<? super T, K> keySelector;
DistinctObserver(Observer<? super T> actual, Function<? super T, K> keySelector, Collection<? super K> collection) {
super(actual);
this.keySelector = keySelector;
this.collection = collection;
Reported by PMD.
Line: 79
try {
key = Objects.requireNonNull(keySelector.apply(value), "The keySelector returned a null key");
b = collection.add(key);
} catch (Throwable ex) {
fail(ex);
return;
}
if (b) {
Reported by PMD.
Line: 20
import java.util.Objects;
import io.reactivex.rxjava3.annotations.Nullable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.disposables.EmptyDisposable;
import io.reactivex.rxjava3.internal.observers.BasicFuseableObserver;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
Reported by PMD.
Line: 22
import io.reactivex.rxjava3.annotations.Nullable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.*;
import io.reactivex.rxjava3.internal.disposables.EmptyDisposable;
import io.reactivex.rxjava3.internal.observers.BasicFuseableObserver;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 45
Collection<? super K> collection;
try {
collection = ExceptionHelper.nullCheck(collectionSupplier.get(), "The collectionSupplier returned a null Collection.");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
EmptyDisposable.error(ex, observer);
return;
}
Reported by PMD.
Line: 78
try {
key = Objects.requireNonNull(keySelector.apply(value), "The keySelector returned a null key");
b = collection.add(key);
} catch (Throwable ex) {
fail(ex);
return;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableScan.java
10 issues
Line: 26
import java.util.Objects;
public final class ObservableScan<T> extends AbstractObservableWithUpstream<T, T> {
final BiFunction<T, T, T> accumulator;
public ObservableScan(ObservableSource<T> source, BiFunction<T, T, T> accumulator) {
super(source);
this.accumulator = accumulator;
}
Reported by PMD.
Line: 38
}
static final class ScanObserver<T> implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final BiFunction<T, T, T> accumulator;
Disposable upstream;
T value;
Reported by PMD.
Line: 39
static final class ScanObserver<T> implements Observer<T>, Disposable {
final Observer<? super T> downstream;
final BiFunction<T, T, T> accumulator;
Disposable upstream;
T value;
Reported by PMD.
Line: 41
final Observer<? super T> downstream;
final BiFunction<T, T, T> accumulator;
Disposable upstream;
T value;
boolean done;
Reported by PMD.
Line: 43
Disposable upstream;
T value;
boolean done;
ScanObserver(Observer<? super T> actual, BiFunction<T, T, T> accumulator) {
this.downstream = actual;
Reported by PMD.
Line: 45
T value;
boolean done;
ScanObserver(Observer<? super T> actual, BiFunction<T, T, T> accumulator) {
this.downstream = actual;
this.accumulator = accumulator;
}
Reported by PMD.
Line: 85
try {
u = Objects.requireNonNull(accumulator.apply(v, t), "The value returned by the accumulator is null");
} 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.BiFunction;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 75
if (done) {
return;
}
final Observer<? super T> a = downstream;
T v = value;
if (v == null) {
value = t;
a.onNext(t);
} else {
Reported by PMD.
Line: 84
T u;
try {
u = Objects.requireNonNull(accumulator.apply(v, t), "The value returned by the accumulator is null");
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.dispose();
onError(e);
return;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableElementAtSingle.java
10 issues
Line: 25
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class ObservableElementAtSingle<T> extends Single<T> implements FuseToObservable<T> {
final ObservableSource<T> source;
final long index;
final T defaultValue;
public ObservableElementAtSingle(ObservableSource<T> source, long index, T defaultValue) {
this.source = source;
Reported by PMD.
Line: 26
public final class ObservableElementAtSingle<T> extends Single<T> implements FuseToObservable<T> {
final ObservableSource<T> source;
final long index;
final T defaultValue;
public ObservableElementAtSingle(ObservableSource<T> source, long index, T defaultValue) {
this.source = source;
this.index = index;
Reported by PMD.
Line: 27
public final class ObservableElementAtSingle<T> extends Single<T> implements FuseToObservable<T> {
final ObservableSource<T> source;
final long index;
final T defaultValue;
public ObservableElementAtSingle(ObservableSource<T> source, long index, T defaultValue) {
this.source = source;
this.index = index;
this.defaultValue = defaultValue;
Reported by PMD.
Line: 46
}
static final class ElementAtObserver<T> implements Observer<T>, Disposable {
final SingleObserver<? super T> downstream;
final long index;
final T defaultValue;
Disposable upstream;
Reported by PMD.
Line: 47
static final class ElementAtObserver<T> implements Observer<T>, Disposable {
final SingleObserver<? super T> downstream;
final long index;
final T defaultValue;
Disposable upstream;
long count;
Reported by PMD.
Line: 48
static final class ElementAtObserver<T> implements Observer<T>, Disposable {
final SingleObserver<? super T> downstream;
final long index;
final T defaultValue;
Disposable upstream;
long count;
Reported by PMD.
Line: 50
final long index;
final T defaultValue;
Disposable upstream;
long count;
boolean done;
Reported by PMD.
Line: 52
Disposable upstream;
long count;
boolean done;
ElementAtObserver(SingleObserver<? super T> actual, long index, T defaultValue) {
this.downstream = actual;
Reported by PMD.
Line: 54
long count;
boolean done;
ElementAtObserver(SingleObserver<? super T> actual, long index, T defaultValue) {
this.downstream = actual;
this.index = index;
this.defaultValue = defaultValue;
Reported by PMD.
Line: 18
import java.util.NoSuchElementException;
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/util/ExceptionHelper.java
9 issues
Line: 59
for (;;) {
Throwable current = field.get();
if (current == TERMINATED) {
return false;
}
Throwable update;
if (current == null) {
Reported by PMD.
Line: 67
if (current == null) {
update = exception;
} else {
update = new CompositeException(current, exception);
}
if (field.compareAndSet(current, update)) {
return true;
}
Reported by PMD.
Line: 78
public static Throwable terminate(AtomicReference<Throwable> field) {
Throwable current = field.get();
if (current != TERMINATED) {
current = field.getAndSet(TERMINATED);
}
return current;
}
Reported by PMD.
Line: 98
Throwable e = deque.removeFirst();
if (e instanceof CompositeException) {
CompositeException ce = (CompositeException) e;
List<Throwable> exceptions = ce.getExceptions();
for (int i = exceptions.size() - 1; i >= 0; i--) {
deque.offerFirst(exceptions.get(i));
}
} else {
list.add(e);
Reported by PMD.
Line: 99
if (e instanceof CompositeException) {
CompositeException ce = (CompositeException) e;
List<Throwable> exceptions = ce.getExceptions();
for (int i = exceptions.size() - 1; i >= 0; i--) {
deque.offerFirst(exceptions.get(i));
}
} else {
list.add(e);
}
Reported by PMD.
Line: 100
CompositeException ce = (CompositeException) e;
List<Throwable> exceptions = ce.getExceptions();
for (int i = exceptions.size() - 1; i >= 0; i--) {
deque.offerFirst(exceptions.get(i));
}
} else {
list.add(e);
}
}
Reported by PMD.
Line: 129
return "The source did not signal an event for "
+ timeout
+ " "
+ unit.toString().toLowerCase()
+ " and has been terminated.";
}
static final class Termination extends Throwable {
Reported by PMD.
Line: 129
return "The source did not signal an event for "
+ timeout
+ " "
+ unit.toString().toLowerCase()
+ " and has been terminated.";
}
static final class Termination extends Throwable {
Reported by PMD.
Line: 133
+ " and has been terminated.";
}
static final class Termination extends Throwable {
private static final long serialVersionUID = -4649703670690200604L;
Termination() {
super("No further exceptions");
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableAll.java
9 issues
Line: 26
public final class FlowableAll<T> extends AbstractFlowableWithUpstream<T, Boolean> {
final Predicate<? super T> predicate;
public FlowableAll(Flowable<T> source, Predicate<? super T> predicate) {
super(source);
this.predicate = predicate;
}
Reported by PMD.
Line: 41
static final class AllSubscriber<T> extends DeferredScalarSubscription<Boolean> implements FlowableSubscriber<T> {
private static final long serialVersionUID = -3521127104134758517L;
final Predicate<? super T> predicate;
Subscription upstream;
boolean done;
Reported by PMD.
Line: 43
private static final long serialVersionUID = -3521127104134758517L;
final Predicate<? super T> predicate;
Subscription upstream;
boolean done;
AllSubscriber(Subscriber<? super Boolean> actual, Predicate<? super T> predicate) {
super(actual);
Reported by PMD.
Line: 45
Subscription upstream;
boolean done;
AllSubscriber(Subscriber<? super Boolean> actual, Predicate<? super T> predicate) {
super(actual);
this.predicate = predicate;
}
Reported by PMD.
Line: 69
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.cancel();
onError(e);
return;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.flowable;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.subscriptions.*;
Reported by PMD.
Line: 18
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.subscriptions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
Reported by PMD.
Line: 21
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Predicate;
import io.reactivex.rxjava3.internal.subscriptions.*;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
public final class FlowableAll<T> extends AbstractFlowableWithUpstream<T, Boolean> {
final Predicate<? super T> predicate;
Reported by PMD.
Line: 68
}
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.cancel();
onError(e);
return;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableLastSingle.java
9 issues
Line: 30
*/
public final class ObservableLastSingle<T> extends Single<T> {
final ObservableSource<T> source;
final T defaultItem;
public ObservableLastSingle(ObservableSource<T> source, T defaultItem) {
this.source = source;
Reported by PMD.
Line: 32
final ObservableSource<T> source;
final T defaultItem;
public ObservableLastSingle(ObservableSource<T> source, T defaultItem) {
this.source = source;
this.defaultItem = defaultItem;
}
Reported by PMD.
Line: 48
static final class LastObserver<T> implements Observer<T>, Disposable {
final SingleObserver<? super T> downstream;
final T defaultItem;
Disposable upstream;
Reported by PMD.
Line: 50
final SingleObserver<? super T> downstream;
final T defaultItem;
Disposable upstream;
T item;
Reported by PMD.
Line: 52
final T defaultItem;
Disposable upstream;
T item;
LastObserver(SingleObserver<? super T> actual, T defaultItem) {
this.downstream = actual;
Reported by PMD.
Line: 54
Disposable upstream;
T item;
LastObserver(SingleObserver<? super T> actual, T defaultItem) {
this.downstream = actual;
this.defaultItem = defaultItem;
}
Reported by PMD.
Line: 89
@Override
public void onError(Throwable t) {
upstream = DisposableHelper.DISPOSED;
item = null;
downstream.onError(t);
}
@Override
public void onComplete() {
Reported by PMD.
Line: 98
upstream = DisposableHelper.DISPOSED;
T v = item;
if (v != null) {
item = null;
downstream.onSuccess(v);
} else {
v = defaultItem;
if (v != null) {
downstream.onSuccess(v);
Reported by PMD.
Line: 18
import java.util.NoSuchElementException;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.internal.disposables.DisposableHelper;
/**
* Consumes the source ObservableSource and emits its last item, the defaultItem
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableAllSingle.java
9 issues
Line: 28
public final class FlowableAllSingle<T> extends Single<Boolean> implements FuseToFlowable<Boolean> {
final Flowable<T> source;
final Predicate<? super T> predicate;
public FlowableAllSingle(Flowable<T> source, Predicate<? super T> predicate) {
this.source = source;
Reported by PMD.
Line: 30
final Flowable<T> source;
final Predicate<? super T> predicate;
public FlowableAllSingle(Flowable<T> source, Predicate<? super T> predicate) {
this.source = source;
this.predicate = predicate;
}
Reported by PMD.
Line: 49
static final class AllSubscriber<T> implements FlowableSubscriber<T>, Disposable {
final SingleObserver<? super Boolean> downstream;
final Predicate<? super T> predicate;
Subscription upstream;
Reported by PMD.
Line: 51
final SingleObserver<? super Boolean> downstream;
final Predicate<? super T> predicate;
Subscription upstream;
boolean done;
Reported by PMD.
Line: 53
final Predicate<? super T> predicate;
Subscription upstream;
boolean done;
AllSubscriber(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) {
this.downstream = actual;
Reported by PMD.
Line: 55
Subscription upstream;
boolean done;
AllSubscriber(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) {
this.downstream = actual;
this.predicate = predicate;
}
Reported by PMD.
Line: 79
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.cancel();
upstream = SubscriptionHelper.CANCELLED;
onError(e);
return;
Reported by PMD.
Line: 18
import org.reactivestreams.Subscription;
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.fuseable.FuseToFlowable;
import io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper;
Reported by PMD.
Line: 78
}
boolean b;
try {
b = predicate.test(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
upstream.cancel();
upstream = SubscriptionHelper.CANCELLED;
onError(e);
Reported by PMD.