The following issues were found
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeJust.java
2 issues
Line: 27
*/
public final class MaybeJust<T> extends Maybe<T> implements ScalarSupplier<T> {
final T value;
public MaybeJust(T value) {
this.value = value;
}
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.fuseable.ScalarSupplier;
/**
* Signals a constant value.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeMaterialize.java
2 issues
Line: 29
*/
public final class MaybeMaterialize<T> extends Single<Notification<T>> {
final Maybe<T> source;
public MaybeMaterialize(Maybe<T> source) {
this.source = source;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.maybe;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.operators.mixed.MaterializeSingleObserver;
/**
* Turn the signal types of a Maybe source into a single Notification of
* equal kind.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/observers/DefaultObserver.java
2 issues
Line: 66
*/
public abstract class DefaultObserver<T> implements Observer<T> {
private Disposable upstream;
@Override
public final void onSubscribe(@NonNull Disposable d) {
if (EndConsumerHelper.validate(this.upstream, d, getClass())) {
this.upstream = d;
Reported by PMD.
Line: 82
protected final void cancel() {
Disposable upstream = this.upstream;
this.upstream = DisposableHelper.DISPOSED;
upstream.dispose();
}
/**
* Called once the subscription has been set on this observer; override this
* to perform initialization.
*/
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/observers/ResumeSingleObserver.java
2 issues
Line: 30
*/
public final class ResumeSingleObserver<T> implements SingleObserver<T> {
final AtomicReference<Disposable> parent;
final SingleObserver<? super T> downstream;
public ResumeSingleObserver(AtomicReference<Disposable> parent, SingleObserver<? super T> downstream) {
this.parent = parent;
Reported by PMD.
Line: 32
final AtomicReference<Disposable> parent;
final SingleObserver<? super T> downstream;
public ResumeSingleObserver(AtomicReference<Disposable> parent, SingleObserver<? super T> downstream) {
this.parent = parent;
this.downstream = downstream;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableFromPublisher.java
2 issues
Line: 21
import io.reactivex.rxjava3.core.Flowable;
public final class FlowableFromPublisher<T> extends Flowable<T> {
final Publisher<? extends T> publisher;
public FlowableFromPublisher(Publisher<? extends T> publisher) {
this.publisher = publisher;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.flowable;
import org.reactivestreams.*;
import io.reactivex.rxjava3.core.Flowable;
public final class FlowableFromPublisher<T> extends Flowable<T> {
final Publisher<? extends T> publisher;
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/disposables/CancellableDisposable.java
2 issues
Line: 48
Cancellable c = getAndSet(null);
if (c != null) {
try {
c.cancel();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(ex);
}
}
Reported by PMD.
Line: 49
if (c != null) {
try {
c.cancel();
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
RxJavaPlugins.onError(ex);
}
}
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/completable/CompletableMaterialize.java
2 issues
Line: 29
*/
public final class CompletableMaterialize<T> extends Single<Notification<T>> {
final Completable source;
public CompletableMaterialize(Completable source) {
this.source = source;
}
Reported by PMD.
Line: 16
package io.reactivex.rxjava3.internal.operators.completable;
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.internal.operators.mixed.MaterializeSingleObserver;
/**
* Turn the signal types of a Completable source into a single Notification of
* equal kind.
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObserverResourceWrapper.java
2 issues
Line: 26
private static final long serialVersionUID = -8612022020200669122L;
final Observer<? super T> downstream;
final AtomicReference<Disposable> upstream = new AtomicReference<>();
public ObserverResourceWrapper(Observer<? super T> downstream) {
this.downstream = downstream;
Reported by PMD.
Line: 28
final Observer<? super T> downstream;
final AtomicReference<Disposable> upstream = new AtomicReference<>();
public ObserverResourceWrapper(Observer<? super T> downstream) {
this.downstream = downstream;
}
Reported by PMD.
src/jmh/java/io/reactivex/rxjava3/core/PerfSubscriber.java
2 issues
Line: 23
public class PerfSubscriber implements FlowableSubscriber<Object> {
public final CountDownLatch latch = new CountDownLatch(1);
private final Blackhole bh;
public PerfSubscriber(Blackhole bh) {
this.bh = bh;
}
Reported by PMD.
Line: 24
public class PerfSubscriber implements FlowableSubscriber<Object> {
public final CountDownLatch latch = new CountDownLatch(1);
private final Blackhole bh;
public PerfSubscriber(Blackhole bh) {
this.bh = bh;
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/disposables/DisposableHelper.java
2 issues
Line: 59
}
if (field.compareAndSet(current, d)) {
if (current != null) {
current.dispose();
}
return true;
}
}
}
Reported by PMD.
Line: 123
if (current != d) {
current = field.getAndSet(d);
if (current != d) {
if (current != null) {
current.dispose();
}
return true;
}
}
Reported by PMD.