The following issues were found
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeIsEmptyTest.java
38 issues
Line: 26
import io.reactivex.rxjava3.processors.PublishProcessor;
import io.reactivex.rxjava3.testsupport.TestHelper;
public class MaybeIsEmptyTest extends RxJavaTest {
@Test
public void normal() {
Maybe.just(1)
.isEmpty()
Reported by PMD.
Line: 29
public class MaybeIsEmptyTest extends RxJavaTest {
@Test
public void normal() {
Maybe.just(1)
.isEmpty()
.test()
.assertResult(false);
}
Reported by PMD.
Line: 30
@Test
public void normal() {
Maybe.just(1)
.isEmpty()
.test()
.assertResult(false);
}
Reported by PMD.
Line: 30
@Test
public void normal() {
Maybe.just(1)
.isEmpty()
.test()
.assertResult(false);
}
Reported by PMD.
Line: 30
@Test
public void normal() {
Maybe.just(1)
.isEmpty()
.test()
.assertResult(false);
}
Reported by PMD.
Line: 37
}
@Test
public void empty() {
Maybe.empty()
.isEmpty()
.test()
.assertResult(true);
}
Reported by PMD.
Line: 38
@Test
public void empty() {
Maybe.empty()
.isEmpty()
.test()
.assertResult(true);
}
Reported by PMD.
Line: 38
@Test
public void empty() {
Maybe.empty()
.isEmpty()
.test()
.assertResult(true);
}
Reported by PMD.
Line: 38
@Test
public void empty() {
Maybe.empty()
.isEmpty()
.test()
.assertResult(true);
}
Reported by PMD.
Line: 45
}
@Test
public void error() {
Maybe.error(new TestException())
.isEmpty()
.test()
.assertFailure(TestException.class);
}
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableToCompletableTest.java
38 issues
Line: 30
public class FlowableToCompletableTest extends RxJavaTest {
@Test
public void justSingleItemObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
Completable cmp = Flowable.just("Hello World!").ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
Reported by PMD.
Line: 32
@Test
public void justSingleItemObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
Completable cmp = Flowable.just("Hello World!").ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
Reported by PMD.
Line: 33
public void justSingleItemObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
Completable cmp = Flowable.just("Hello World!").ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
}
Reported by PMD.
Line: 33
public void justSingleItemObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
Completable cmp = Flowable.just("Hello World!").ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
}
Reported by PMD.
Line: 35
Completable cmp = Flowable.just("Hello World!").ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
}
@Test
Reported by PMD.
Line: 36
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
}
@Test
public void errorObservable() {
Reported by PMD.
Line: 37
subscriber.assertNoValues();
subscriber.assertComplete();
subscriber.assertNoErrors();
}
@Test
public void errorObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
Reported by PMD.
Line: 41
}
@Test
public void errorObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
IllegalArgumentException error = new IllegalArgumentException("Error");
Completable cmp = Flowable.<String>error(error).ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
Reported by PMD.
Line: 44
public void errorObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
IllegalArgumentException error = new IllegalArgumentException("Error");
Completable cmp = Flowable.<String>error(error).ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertError(error);
subscriber.assertNoValues();
}
Reported by PMD.
Line: 44
public void errorObservable() {
TestSubscriber<String> subscriber = TestSubscriber.create();
IllegalArgumentException error = new IllegalArgumentException("Error");
Completable cmp = Flowable.<String>error(error).ignoreElements();
cmp.<String>toFlowable().subscribe(subscriber);
subscriber.assertError(error);
subscriber.assertNoValues();
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/parallel/ParallelMapTry.java
38 issues
Line: 51
}
@Override
public void subscribe(Subscriber<? super R>[] subscribers) {
subscribers = RxJavaPlugins.onSubscribe(this, subscribers);
if (!validate(subscribers)) {
return;
}
Reported by PMD.
Line: 167
}
downstream.onNext(v);
return true;
}
}
@Override
public void onError(Throwable t) {
Reported by PMD.
Line: 279
}
}
return downstream.tryOnNext(v);
}
}
@Override
public void onError(Throwable t) {
Reported by PMD.
Line: 37
*/
public final class ParallelMapTry<T, R> extends ParallelFlowable<R> {
final ParallelFlowable<T> source;
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Reported by PMD.
Line: 39
final ParallelFlowable<T> source;
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
public ParallelMapTry(ParallelFlowable<T> source, Function<? super T, ? extends R> mapper,
BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) {
Reported by PMD.
Line: 41
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
public ParallelMapTry(ParallelFlowable<T> source, Function<? super T, ? extends R> mapper,
BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) {
this.source = source;
this.mapper = mapper;
Reported by PMD.
Line: 81
static final class ParallelMapTrySubscriber<T, R> implements ConditionalSubscriber<T>, Subscription {
final Subscriber<? super R> downstream;
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Reported by PMD.
Line: 83
final Subscriber<? super R> downstream;
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
Reported by PMD.
Line: 85
final Function<? super T, ? extends R> mapper;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
boolean done;
Reported by PMD.
Line: 87
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
boolean done;
ParallelMapTrySubscriber(Subscriber<? super R> actual, Function<? super T, ? extends R> mapper,
BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) {
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableMapNotificationTest.java
38 issues
Line: 31
public class FlowableMapNotificationTest extends RxJavaTest {
@Test
public void just() {
TestSubscriber<Object> ts = new TestSubscriber<>();
Flowable.just(1)
.flatMap(
new Function<Integer, Flowable<Object>>() {
@Override
Reported by PMD.
Line: 61
}
@Test
public void backpressure() {
TestSubscriber<Object> ts = TestSubscriber.create(0L);
new FlowableMapNotification<>(Flowable.range(1, 3),
new Function<Integer, Integer>() {
@Override
Reported by PMD.
Line: 85
}
).subscribe(ts);
ts.assertNoValues();
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(3);
Reported by PMD.
Line: 86
).subscribe(ts);
ts.assertNoValues();
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(3);
ts.assertValues(2, 3, 4);
Reported by PMD.
Line: 87
ts.assertNoValues();
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(3);
ts.assertValues(2, 3, 4);
ts.assertNoErrors();
Reported by PMD.
Line: 89
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(3);
ts.assertValues(2, 3, 4);
ts.assertNoErrors();
ts.assertNotComplete();
Reported by PMD.
Line: 91
ts.request(3);
ts.assertValues(2, 3, 4);
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(1);
Reported by PMD.
Line: 92
ts.request(3);
ts.assertValues(2, 3, 4);
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(1);
ts.assertValues(2, 3, 4, 5);
Reported by PMD.
Line: 93
ts.assertValues(2, 3, 4);
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(1);
ts.assertValues(2, 3, 4, 5);
ts.assertNoErrors();
Reported by PMD.
Line: 95
ts.assertNoErrors();
ts.assertNotComplete();
ts.request(1);
ts.assertValues(2, 3, 4, 5);
ts.assertNoErrors();
ts.assertComplete();
}
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/observers/CompletableConsumersTest.java
38 issues
Line: 50
public class CompletableConsumersTest implements Consumer<Object>, Action {
final CompositeDisposable composite = new CompositeDisposable();
final CompletableSubject processor = CompletableSubject.create();
final List<Object> events = new ArrayList<>();
Reported by PMD.
Line: 52
final CompositeDisposable composite = new CompositeDisposable();
final CompletableSubject processor = CompletableSubject.create();
final List<Object> events = new ArrayList<>();
@Override
public void run() throws Exception {
Reported by PMD.
Line: 54
final CompletableSubject processor = CompletableSubject.create();
final List<Object> events = new ArrayList<>();
@Override
public void run() throws Exception {
events.add("OnComplete");
}
Reported by PMD.
Line: 58
@Override
public void run() throws Exception {
events.add("OnComplete");
}
@Override
public void accept(Object t) throws Exception {
events.add(t);
Reported by PMD.
Line: 67
}
@Test
public void onErrorNormal() {
processor.subscribe(this, this, composite);
assertTrue(composite.size() > 0);
Reported by PMD.
Line: 71
processor.subscribe(this, this, composite);
assertTrue(composite.size() > 0);
assertTrue(events.toString(), events.isEmpty());
processor.onComplete();
Reported by PMD.
Line: 77
processor.onComplete();
assertEquals(0, composite.size());
assertEquals(Arrays.<Object>asList("OnComplete"), events);
}
Reported by PMD.
Line: 79
assertEquals(0, composite.size());
assertEquals(Arrays.<Object>asList("OnComplete"), events);
}
@Test
public void onErrorError() {
Reported by PMD.
Line: 84
}
@Test
public void onErrorError() {
Disposable d = processor.subscribe(this, this, composite);
assertTrue(d.getClass().toString(), ((LambdaConsumerIntrospection)d).hasCustomOnError());
Reported by PMD.
Line: 88
Disposable d = processor.subscribe(this, this, composite);
assertTrue(d.getClass().toString(), ((LambdaConsumerIntrospection)d).hasCustomOnError());
assertTrue(composite.size() > 0);
assertTrue(events.toString(), events.isEmpty());
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/jdk8/ObservableBlockingStreamTest.java
38 issues
Line: 32
@Test
public void empty() {
try (Stream<Integer> stream = Observable.<Integer>empty().blockingStream()) {
assertEquals(0, stream.toArray().length);
}
}
@Test
Reported by PMD.
Line: 32
@Test
public void empty() {
try (Stream<Integer> stream = Observable.<Integer>empty().blockingStream()) {
assertEquals(0, stream.toArray().length);
}
}
@Test
Reported by PMD.
Line: 33
@Test
public void empty() {
try (Stream<Integer> stream = Observable.<Integer>empty().blockingStream()) {
assertEquals(0, stream.toArray().length);
}
}
@Test
public void just() {
Reported by PMD.
Line: 33
@Test
public void empty() {
try (Stream<Integer> stream = Observable.<Integer>empty().blockingStream()) {
assertEquals(0, stream.toArray().length);
}
}
@Test
public void just() {
Reported by PMD.
Line: 39
@Test
public void just() {
try (Stream<Integer> stream = Observable.just(1).blockingStream()) {
assertArrayEquals(new Integer[] { 1 }, stream.toArray(Integer[]::new));
}
}
@Test
Reported by PMD.
Line: 40
@Test
public void just() {
try (Stream<Integer> stream = Observable.just(1).blockingStream()) {
assertArrayEquals(new Integer[] { 1 }, stream.toArray(Integer[]::new));
}
}
@Test
public void range() {
Reported by PMD.
Line: 46
@Test
public void range() {
try (Stream<Integer> stream = Observable.range(1, 5).blockingStream()) {
assertArrayEquals(new Integer[] { 1, 2, 3, 4, 5 }, stream.toArray(Integer[]::new));
}
}
@Test
Reported by PMD.
Line: 47
@Test
public void range() {
try (Stream<Integer> stream = Observable.range(1, 5).blockingStream()) {
assertArrayEquals(new Integer[] { 1, 2, 3, 4, 5 }, stream.toArray(Integer[]::new));
}
}
@Test
public void rangeBackpressured() {
Reported by PMD.
Line: 53
@Test
public void rangeBackpressured() {
try (Stream<Integer> stream = Observable.range(1, 5).blockingStream(1)) {
assertArrayEquals(new Integer[] { 1, 2, 3, 4, 5 }, stream.toArray(Integer[]::new));
}
}
@Test
Reported by PMD.
Line: 54
@Test
public void rangeBackpressured() {
try (Stream<Integer> stream = Observable.range(1, 5).blockingStream(1)) {
assertArrayEquals(new Integer[] { 1, 2, 3, 4, 5 }, stream.toArray(Integer[]::new));
}
}
@Test
public void rangeAsyncBackpressured() {
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/parallel/ParallelDoOnNextTry.java
38 issues
Line: 50
}
@Override
public void subscribe(Subscriber<? super T>[] subscribers) {
subscribers = RxJavaPlugins.onSubscribe(this, subscribers);
if (!validate(subscribers)) {
return;
}
Reported by PMD.
Line: 164
}
downstream.onNext(t);
return true;
}
}
@Override
public void onError(Throwable t) {
Reported by PMD.
Line: 274
}
}
return downstream.tryOnNext(t);
}
}
@Override
public void onError(Throwable t) {
Reported by PMD.
Line: 36
*/
public final class ParallelDoOnNextTry<T> extends ParallelFlowable<T> {
final ParallelFlowable<T> source;
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Reported by PMD.
Line: 38
final ParallelFlowable<T> source;
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
public ParallelDoOnNextTry(ParallelFlowable<T> source, Consumer<? super T> onNext,
BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) {
Reported by PMD.
Line: 40
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
public ParallelDoOnNextTry(ParallelFlowable<T> source, Consumer<? super T> onNext,
BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) {
this.source = source;
this.onNext = onNext;
Reported by PMD.
Line: 80
static final class ParallelDoOnNextSubscriber<T> implements ConditionalSubscriber<T>, Subscription {
final Subscriber<? super T> downstream;
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Reported by PMD.
Line: 82
final Subscriber<? super T> downstream;
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
Reported by PMD.
Line: 82
final Subscriber<? super T> downstream;
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
Reported by PMD.
Line: 84
final Consumer<? super T> onNext;
final BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler;
Subscription upstream;
boolean done;
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeFromRunnableTest.java
38 issues
Line: 137
try {
cdl2.await(5, TimeUnit.SECONDS);
} catch (InterruptedException ex) {
throw new RuntimeException(ex);
}
}
}).subscribeOn(Schedulers.single()).test();
assertTrue(cdl1.await(5, TimeUnit.SECONDS));
Reported by PMD.
Line: 46
.test()
.assertResult();
assertEquals(1, atomicInteger.get());
}
@Test
public void fromRunnableTwice() {
final AtomicInteger atomicInteger = new AtomicInteger();
Reported by PMD.
Line: 50
}
@Test
public void fromRunnableTwice() {
final AtomicInteger atomicInteger = new AtomicInteger();
Runnable run = new Runnable() {
@Override
public void run() {
Reported by PMD.
Line: 60
}
};
Maybe.fromRunnable(run)
.test()
.assertResult();
assertEquals(1, atomicInteger.get());
Reported by PMD.
Line: 60
}
};
Maybe.fromRunnable(run)
.test()
.assertResult();
assertEquals(1, atomicInteger.get());
Reported by PMD.
Line: 64
.test()
.assertResult();
assertEquals(1, atomicInteger.get());
Maybe.fromRunnable(run)
.test()
.assertResult();
Reported by PMD.
Line: 66
assertEquals(1, atomicInteger.get());
Maybe.fromRunnable(run)
.test()
.assertResult();
assertEquals(2, atomicInteger.get());
}
Reported by PMD.
Line: 66
assertEquals(1, atomicInteger.get());
Maybe.fromRunnable(run)
.test()
.assertResult();
assertEquals(2, atomicInteger.get());
}
Reported by PMD.
Line: 70
.test()
.assertResult();
assertEquals(2, atomicInteger.get());
}
@Test
public void fromRunnableInvokesLazy() {
final AtomicInteger atomicInteger = new AtomicInteger();
Reported by PMD.
Line: 74
}
@Test
public void fromRunnableInvokesLazy() {
final AtomicInteger atomicInteger = new AtomicInteger();
final Maybe<Object> maybe = Maybe.fromRunnable(new Runnable() {
@Override public void run() {
atomicInteger.incrementAndGet();
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/util/OperatorMatrixGenerator.java
38 issues
Line: 30
* Should be run with the main project directory as working directory where the {@code docs}
* folder is.
*/
public final class OperatorMatrixGenerator {
private OperatorMatrixGenerator() {
throw new IllegalStateException("No instances!");
}
Reported by PMD.
Line: 30
* Should be run with the main project directory as working directory where the {@code docs}
* folder is.
*/
public final class OperatorMatrixGenerator {
private OperatorMatrixGenerator() {
throw new IllegalStateException("No instances!");
}
Reported by PMD.
Line: 45
};
static String header(String type) {
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 48
return " + ".png)";
}
public static void main(String[] args) throws IOException {
Set<String> operatorSet = new HashSet<>();
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
Reported by PMD.
Line: 53
Map<Class<?>, Set<String>> operatorMap = new HashMap<>();
for (Class<?> clazz : CLASSES) {
Set<String> set = operatorMap.computeIfAbsent(clazz, c -> new HashSet<>());
for (Method m : clazz.getMethods()) {
String name = m.getName();
if (!name.equals("bufferSize")
&& m.getDeclaringClass() == clazz
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableDelaySubscriptionOtherTest.java
38 issues
Line: 30
import io.reactivex.rxjava3.subscribers.TestSubscriber;
import io.reactivex.rxjava3.testsupport.TestHelper;
public class FlowableDelaySubscriptionOtherTest extends RxJavaTest {
@Test
public void noPrematureSubscription() {
PublishProcessor<Object> other = PublishProcessor.create();
TestSubscriber<Integer> ts = new TestSubscriber<>();
Reported by PMD.
Line: 53
ts.assertNoErrors();
ts.assertNoValues();
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onNext(1);
Assert.assertEquals("No subscription", 1, subscribed.get());
Reported by PMD.
Line: 55
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onNext(1);
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertValue(1);
ts.assertNoErrors();
Reported by PMD.
Line: 57
other.onNext(1);
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertValue(1);
ts.assertNoErrors();
ts.assertComplete();
}
Reported by PMD.
Line: 88
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onNext(1);
other.onNext(2);
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertValue(1);
Reported by PMD.
Line: 89
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onNext(1);
other.onNext(2);
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertValue(1);
ts.assertNoErrors();
Reported by PMD.
Line: 122
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onComplete();
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertValue(1);
ts.assertNoErrors();
Reported by PMD.
Line: 155
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onComplete();
Assert.assertEquals("No subscription", 1, subscribed.get());
ts.assertNoValues();
ts.assertNotComplete();
Reported by PMD.
Line: 222
Assert.assertEquals("Premature subscription", 0, subscribed.get());
other.onNext(1);
Assert.assertEquals("No subscription", 1, subscribed.get());
Assert.assertFalse("Not unsubscribed from other", other.hasSubscribers());
Reported by PMD.
Line: 226
Assert.assertEquals("No subscription", 1, subscribed.get());
Assert.assertFalse("Not unsubscribed from other", other.hasSubscribers());
ts.assertNotComplete();
ts.assertNoErrors();
ts.assertNoValues();
Reported by PMD.