The following issues were found
src/test/java/io/reactivex/rxjava3/validators/FixLicenseHeaders.java
39 issues
Line: 77
if (u.getName().endsWith(".java")) {
List<String> lines = new ArrayList<>();
BufferedReader in = new BufferedReader(new FileReader(u));
try {
for (;;) {
String line = in.readLine();
if (line == null) {
break;
Reported by PMD.
Line: 113
lines.addAll(0, Arrays.asList(header));
PrintWriter w = new PrintWriter(new FileWriter(u));
try {
for (String s : lines) {
w.println(s);
}
Reported by PMD.
Line: 130
}
if (fail.length() != 0) {
System.out.println(fail);
throw new AssertionError(fail.toString());
}
}
}
Reported by PMD.
Line: 26
/**
* Adds license header to java files.
*/
public class FixLicenseHeaders {
String[] header = {
"/*",
" * Copyright (c) 2016-present, RxJava Contributors.",
" *",
Reported by PMD.
Line: 26
/**
* Adds license header to java files.
*/
public class FixLicenseHeaders {
String[] header = {
"/*",
" * Copyright (c) 2016-present, RxJava Contributors.",
" *",
Reported by PMD.
Line: 28
*/
public class FixLicenseHeaders {
String[] header = {
"/*",
" * Copyright (c) 2016-present, RxJava Contributors.",
" *",
" * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in",
" * compliance with the License. You may obtain a copy of the License at",
Reported by PMD.
Line: 45
};
@Test
public void checkAndUpdateLicenses() throws Exception {
if (System.getenv("CI") != null) {
// no point in changing the files in CI
return;
}
File f = TestHelper.findSource("Flowable");
Reported by PMD.
Line: 45
};
@Test
public void checkAndUpdateLicenses() throws Exception {
if (System.getenv("CI") != null) {
// no point in changing the files in CI
return;
}
File f = TestHelper.findSource("Flowable");
Reported by PMD.
Line: 45
};
@Test
public void checkAndUpdateLicenses() throws Exception {
if (System.getenv("CI") != null) {
// no point in changing the files in CI
return;
}
File f = TestHelper.findSource("Flowable");
Reported by PMD.
Line: 45
};
@Test
public void checkAndUpdateLicenses() throws Exception {
if (System.getenv("CI") != null) {
// no point in changing the files in CI
return;
}
File f = TestHelper.findSource("Flowable");
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableWindowBoundary.java
39 issues
Line: 28
import io.reactivex.rxjava3.subjects.UnicastSubject;
public final class ObservableWindowBoundary<T, B> extends AbstractObservableWithUpstream<T, Observable<T>> {
final ObservableSource<B> other;
final int capacityHint;
public ObservableWindowBoundary(ObservableSource<T> source, ObservableSource<B> other, int capacityHint) {
super(source);
this.other = other;
Reported by PMD.
Line: 29
public final class ObservableWindowBoundary<T, B> extends AbstractObservableWithUpstream<T, Observable<T>> {
final ObservableSource<B> other;
final int capacityHint;
public ObservableWindowBoundary(ObservableSource<T> source, ObservableSource<B> other, int capacityHint) {
super(source);
this.other = other;
this.capacityHint = capacityHint;
Reported by PMD.
Line: 47
source.subscribe(parent);
}
static final class WindowBoundaryMainObserver<T, B>
extends AtomicInteger
implements Observer<T>, Disposable, Runnable {
private static final long serialVersionUID = 2233020065421370272L;
Reported by PMD.
Line: 47
source.subscribe(parent);
}
static final class WindowBoundaryMainObserver<T, B>
extends AtomicInteger
implements Observer<T>, Disposable, Runnable {
private static final long serialVersionUID = 2233020065421370272L;
Reported by PMD.
Line: 53
private static final long serialVersionUID = 2233020065421370272L;
final Observer<? super Observable<T>> downstream;
final int capacityHint;
final WindowBoundaryInnerObserver<T, B> boundaryObserver;
Reported by PMD.
Line: 55
final Observer<? super Observable<T>> downstream;
final int capacityHint;
final WindowBoundaryInnerObserver<T, B> boundaryObserver;
final AtomicReference<Disposable> upstream;
Reported by PMD.
Line: 57
final int capacityHint;
final WindowBoundaryInnerObserver<T, B> boundaryObserver;
final AtomicReference<Disposable> upstream;
final AtomicInteger windows;
Reported by PMD.
Line: 59
final WindowBoundaryInnerObserver<T, B> boundaryObserver;
final AtomicReference<Disposable> upstream;
final AtomicInteger windows;
final MpscLinkedQueue<Object> queue;
Reported by PMD.
Line: 61
final AtomicReference<Disposable> upstream;
final AtomicInteger windows;
final MpscLinkedQueue<Object> queue;
final AtomicThrowable errors;
Reported by PMD.
Line: 63
final AtomicInteger windows;
final MpscLinkedQueue<Object> queue;
final AtomicThrowable errors;
final AtomicBoolean stopWindows;
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeDoAfterSuccessTest.java
39 issues
Line: 33
public class MaybeDoAfterSuccessTest extends RxJavaTest {
final List<Integer> values = new ArrayList<>();
final Consumer<Integer> afterSuccess = new Consumer<Integer>() {
@Override
public void accept(Integer e) throws Exception {
values.add(-e);
Reported by PMD.
Line: 35
final List<Integer> values = new ArrayList<>();
final Consumer<Integer> afterSuccess = new Consumer<Integer>() {
@Override
public void accept(Integer e) throws Exception {
values.add(-e);
}
};
Reported by PMD.
Line: 42
}
};
final TestObserver<Integer> to = new TestObserver<Integer>() {
@Override
public void onNext(Integer t) {
super.onNext(t);
MaybeDoAfterSuccessTest.this.values.add(t);
}
Reported by PMD.
Line: 46
@Override
public void onNext(Integer t) {
super.onNext(t);
MaybeDoAfterSuccessTest.this.values.add(t);
}
};
@Test
public void just() {
Reported by PMD.
Line: 46
@Override
public void onNext(Integer t) {
super.onNext(t);
MaybeDoAfterSuccessTest.this.values.add(t);
}
};
@Test
public void just() {
Reported by PMD.
Line: 46
@Override
public void onNext(Integer t) {
super.onNext(t);
MaybeDoAfterSuccessTest.this.values.add(t);
}
};
@Test
public void just() {
Reported by PMD.
Line: 52
@Test
public void just() {
Maybe.just(1)
.doAfterSuccess(afterSuccess)
.subscribeWith(to)
.assertResult(1);
assertEquals(Arrays.asList(1, -1), values);
Reported by PMD.
Line: 52
@Test
public void just() {
Maybe.just(1)
.doAfterSuccess(afterSuccess)
.subscribeWith(to)
.assertResult(1);
assertEquals(Arrays.asList(1, -1), values);
Reported by PMD.
Line: 52
@Test
public void just() {
Maybe.just(1)
.doAfterSuccess(afterSuccess)
.subscribeWith(to)
.assertResult(1);
assertEquals(Arrays.asList(1, -1), values);
Reported by PMD.
Line: 57
.subscribeWith(to)
.assertResult(1);
assertEquals(Arrays.asList(1, -1), values);
}
@Test
public void error() {
Maybe.<Integer>error(new TestException())
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeMergeTest.java
39 issues
Line: 29
public class MaybeMergeTest extends RxJavaTest {
@Test
public void delayErrorWithMaxConcurrency() {
Maybe.mergeDelayError(
Flowable.just(Maybe.just(1), Maybe.just(2), Maybe.just(3)), 1)
.test()
.assertResult(1, 2, 3);
}
Reported by PMD.
Line: 30
@Test
public void delayErrorWithMaxConcurrency() {
Maybe.mergeDelayError(
Flowable.just(Maybe.just(1), Maybe.just(2), Maybe.just(3)), 1)
.test()
.assertResult(1, 2, 3);
}
Reported by PMD.
Line: 30
@Test
public void delayErrorWithMaxConcurrency() {
Maybe.mergeDelayError(
Flowable.just(Maybe.just(1), Maybe.just(2), Maybe.just(3)), 1)
.test()
.assertResult(1, 2, 3);
}
Reported by PMD.
Line: 37
}
@Test
public void delayErrorWithMaxConcurrencyError() {
Maybe.mergeDelayError(
Flowable.just(Maybe.just(1), Maybe.<Integer>error(new TestException()), Maybe.just(3)), 1)
.test()
.assertFailure(TestException.class, 1, 3);
}
Reported by PMD.
Line: 45
}
@Test
public void delayErrorWithMaxConcurrencyAsync() {
final AtomicInteger count = new AtomicInteger();
@SuppressWarnings("unchecked")
Maybe<Integer>[] sources = new Maybe[3];
for (int i = 0; i < 3; i++) {
final int j = i + 1;
Reported by PMD.
Line: 51
Maybe<Integer>[] sources = new Maybe[3];
for (int i = 0; i < 3; i++) {
final int j = i + 1;
sources[i] = Maybe.fromCallable(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return count.incrementAndGet() - j;
}
})
Reported by PMD.
Line: 62
for (int i = 0; i < 1000; i++) {
count.set(0);
Maybe.mergeDelayError(
Flowable.fromArray(sources), 1)
.test()
.awaitDone(5, TimeUnit.SECONDS)
.assertResult(0, 0, 0);
}
Reported by PMD.
Line: 62
for (int i = 0; i < 1000; i++) {
count.set(0);
Maybe.mergeDelayError(
Flowable.fromArray(sources), 1)
.test()
.awaitDone(5, TimeUnit.SECONDS)
.assertResult(0, 0, 0);
}
Reported by PMD.
Line: 62
for (int i = 0; i < 1000; i++) {
count.set(0);
Maybe.mergeDelayError(
Flowable.fromArray(sources), 1)
.test()
.awaitDone(5, TimeUnit.SECONDS)
.assertResult(0, 0, 0);
}
Reported by PMD.
Line: 71
}
@Test
public void delayErrorWithMaxConcurrencyAsyncError() {
final AtomicInteger count = new AtomicInteger();
@SuppressWarnings("unchecked")
Maybe<Integer>[] sources = new Maybe[3];
for (int i = 0; i < 3; i++) {
final int j = i + 1;
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeDetachTest.java
39 issues
Line: 83
to.dispose();
System.gc();
Thread.sleep(200);
to.assertEmpty();
assertNull(wr.get());
Reported by PMD.
Line: 109
d = null;
System.gc();
Thread.sleep(200);
to.assertResult();
assertNull(wr.get());
Reported by PMD.
Line: 135
d = null;
System.gc();
Thread.sleep(200);
to.assertFailure(TestException.class);
assertNull(wr.get());
Reported by PMD.
Line: 161
d = null;
System.gc();
Thread.sleep(200);
to.assertResult(1);
assertNull(wr.get());
Reported by PMD.
Line: 34
public class MaybeDetachTest extends RxJavaTest {
@Test
public void doubleSubscribe() {
TestHelper.checkDoubleOnSubscribeMaybe(new Function<Maybe<Object>, MaybeSource<Object>>() {
@Override
public MaybeSource<Object> apply(Maybe<Object> m) throws Exception {
return m.onTerminateDetach();
Reported by PMD.
Line: 45
}
@Test
public void dispose() {
TestHelper.checkDisposed(PublishProcessor.create().singleElement().onTerminateDetach());
}
@Test
public void onError() {
Reported by PMD.
Line: 46
@Test
public void dispose() {
TestHelper.checkDisposed(PublishProcessor.create().singleElement().onTerminateDetach());
}
@Test
public void onError() {
Maybe.error(new TestException())
Reported by PMD.
Line: 46
@Test
public void dispose() {
TestHelper.checkDisposed(PublishProcessor.create().singleElement().onTerminateDetach());
}
@Test
public void onError() {
Maybe.error(new TestException())
Reported by PMD.
Line: 50
}
@Test
public void onError() {
Maybe.error(new TestException())
.onTerminateDetach()
.test()
.assertFailure(TestException.class);
}
Reported by PMD.
Line: 58
}
@Test
public void onComplete() {
Maybe.empty()
.onTerminateDetach()
.test()
.assertResult();
}
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeDelaySubscriptionTest.java
39 issues
Line: 37
public class MaybeDelaySubscriptionTest extends RxJavaTest {
@Test
public void normal() {
PublishProcessor<Object> pp = PublishProcessor.create();
TestObserver<Integer> to = Maybe.just(1).delaySubscription(pp)
.test();
Reported by PMD.
Line: 40
public void normal() {
PublishProcessor<Object> pp = PublishProcessor.create();
TestObserver<Integer> to = Maybe.just(1).delaySubscription(pp)
.test();
assertTrue(pp.hasSubscribers());
to.assertEmpty();
Reported by PMD.
Line: 40
public void normal() {
PublishProcessor<Object> pp = PublishProcessor.create();
TestObserver<Integer> to = Maybe.just(1).delaySubscription(pp)
.test();
assertTrue(pp.hasSubscribers());
to.assertEmpty();
Reported by PMD.
Line: 43
TestObserver<Integer> to = Maybe.just(1).delaySubscription(pp)
.test();
assertTrue(pp.hasSubscribers());
to.assertEmpty();
pp.onNext("one");
Reported by PMD.
Line: 43
TestObserver<Integer> to = Maybe.just(1).delaySubscription(pp)
.test();
assertTrue(pp.hasSubscribers());
to.assertEmpty();
pp.onNext("one");
Reported by PMD.
Line: 45
assertTrue(pp.hasSubscribers());
to.assertEmpty();
pp.onNext("one");
assertFalse(pp.hasSubscribers());
Reported by PMD.
Line: 47
to.assertEmpty();
pp.onNext("one");
assertFalse(pp.hasSubscribers());
to.assertResult(1);
}
Reported by PMD.
Line: 49
pp.onNext("one");
assertFalse(pp.hasSubscribers());
to.assertResult(1);
}
@Test
Reported by PMD.
Line: 49
pp.onNext("one");
assertFalse(pp.hasSubscribers());
to.assertResult(1);
}
@Test
Reported by PMD.
Line: 51
assertFalse(pp.hasSubscribers());
to.assertResult(1);
}
@Test
public void timed() {
Maybe.just(1).delaySubscription(100, TimeUnit.MILLISECONDS)
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleStartWithTest.java
39 issues
Line: 21
import io.reactivex.rxjava3.core.*;
import io.reactivex.rxjava3.exceptions.TestException;
public class SingleStartWithTest {
@Test
public void justCompletableComplete() {
Single.just(1)
.startWith(Completable.complete())
Reported by PMD.
Line: 24
public class SingleStartWithTest {
@Test
public void justCompletableComplete() {
Single.just(1)
.startWith(Completable.complete())
.test()
.assertResult(1);
}
Reported by PMD.
Line: 25
@Test
public void justCompletableComplete() {
Single.just(1)
.startWith(Completable.complete())
.test()
.assertResult(1);
}
Reported by PMD.
Line: 25
@Test
public void justCompletableComplete() {
Single.just(1)
.startWith(Completable.complete())
.test()
.assertResult(1);
}
Reported by PMD.
Line: 25
@Test
public void justCompletableComplete() {
Single.just(1)
.startWith(Completable.complete())
.test()
.assertResult(1);
}
Reported by PMD.
Line: 32
}
@Test
public void justCompletableError() {
Single.just(1)
.startWith(Completable.error(new TestException()))
.test()
.assertFailure(TestException.class);
}
Reported by PMD.
Line: 40
}
@Test
public void justSingleJust() {
Single.just(1)
.startWith(Single.just(0))
.test()
.assertResult(0, 1);
}
Reported by PMD.
Line: 41
@Test
public void justSingleJust() {
Single.just(1)
.startWith(Single.just(0))
.test()
.assertResult(0, 1);
}
Reported by PMD.
Line: 41
@Test
public void justSingleJust() {
Single.just(1)
.startWith(Single.just(0))
.test()
.assertResult(0, 1);
}
Reported by PMD.
Line: 41
@Test
public void justSingleJust() {
Single.just(1)
.startWith(Single.just(0))
.test()
.assertResult(0, 1);
}
Reported by PMD.
src/main/java/io/reactivex/rxjava3/internal/operators/parallel/ParallelPeek.java
39 issues
Line: 68
}
@Override
public void subscribe(Subscriber<? super T>[] subscribers) {
subscribers = RxJavaPlugins.onSubscribe(this, subscribers);
if (!validate(subscribers)) {
return;
}
Reported by PMD.
Line: 170
}
@Override
public void onError(Throwable t) {
if (done) {
RxJavaPlugins.onError(t);
return;
}
done = true;
Reported by PMD.
Line: 34
*/
public final class ParallelPeek<T> extends ParallelFlowable<T> {
final ParallelFlowable<T> source;
final Consumer<? super T> onNext;
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
Reported by PMD.
Line: 36
final ParallelFlowable<T> source;
final Consumer<? super T> onNext;
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
Reported by PMD.
Line: 37
final ParallelFlowable<T> source;
final Consumer<? super T> onNext;
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
Reported by PMD.
Line: 38
final Consumer<? super T> onNext;
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
final Action onCancel;
Reported by PMD.
Line: 39
final Consumer<? super T> onNext;
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
final Action onCancel;
Reported by PMD.
Line: 40
final Consumer<? super T> onAfterNext;
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
final Action onCancel;
public ParallelPeek(ParallelFlowable<T> source,
Reported by PMD.
Line: 41
final Consumer<? super Throwable> onError;
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
final Action onCancel;
public ParallelPeek(ParallelFlowable<T> source,
Consumer<? super T> onNext,
Reported by PMD.
Line: 42
final Action onComplete;
final Action onAfterTerminated;
final Consumer<? super Subscription> onSubscribe;
final LongConsumer onRequest;
final Action onCancel;
public ParallelPeek(ParallelFlowable<T> source,
Consumer<? super T> onNext,
Consumer<? super T> onAfterNext,
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/NotificationLiteTest.java
38 issues
Line: 30
public class NotificationLiteTest extends RxJavaTest {
@Test
public void complete() {
Object n = NotificationLite.next("Hello");
Object c = NotificationLite.complete();
assertTrue(NotificationLite.isComplete(c));
assertFalse(NotificationLite.isComplete(n));
Reported by PMD.
Line: 34
Object n = NotificationLite.next("Hello");
Object c = NotificationLite.complete();
assertTrue(NotificationLite.isComplete(c));
assertFalse(NotificationLite.isComplete(n));
assertEquals("Hello", NotificationLite.getValue(n));
}
Reported by PMD.
Line: 35
Object c = NotificationLite.complete();
assertTrue(NotificationLite.isComplete(c));
assertFalse(NotificationLite.isComplete(n));
assertEquals("Hello", NotificationLite.getValue(n));
}
@Test
Reported by PMD.
Line: 37
assertTrue(NotificationLite.isComplete(c));
assertFalse(NotificationLite.isComplete(n));
assertEquals("Hello", NotificationLite.getValue(n));
}
@Test
public void valueKind() {
assertSame(1, NotificationLite.next(1));
Reported by PMD.
Line: 42
@Test
public void valueKind() {
assertSame(1, NotificationLite.next(1));
}
@Test
public void soloEnum() {
TestHelper.checkEnum(NotificationLite.class);
Reported by PMD.
Line: 46
}
@Test
public void soloEnum() {
TestHelper.checkEnum(NotificationLite.class);
}
@Test
public void errorNotification() {
Reported by PMD.
Line: 51
}
@Test
public void errorNotification() {
Object o = NotificationLite.error(new TestException());
assertEquals("NotificationLite.Error[io.reactivex.rxjava3.exceptions.TestException]", o.toString());
assertTrue(NotificationLite.isError(o));
Reported by PMD.
Line: 54
public void errorNotification() {
Object o = NotificationLite.error(new TestException());
assertEquals("NotificationLite.Error[io.reactivex.rxjava3.exceptions.TestException]", o.toString());
assertTrue(NotificationLite.isError(o));
assertFalse(NotificationLite.isComplete(o));
assertFalse(NotificationLite.isDisposable(o));
assertFalse(NotificationLite.isSubscription(o));
Reported by PMD.
Line: 56
assertEquals("NotificationLite.Error[io.reactivex.rxjava3.exceptions.TestException]", o.toString());
assertTrue(NotificationLite.isError(o));
assertFalse(NotificationLite.isComplete(o));
assertFalse(NotificationLite.isDisposable(o));
assertFalse(NotificationLite.isSubscription(o));
assertTrue(NotificationLite.getError(o) instanceof TestException);
Reported by PMD.
Line: 57
assertEquals("NotificationLite.Error[io.reactivex.rxjava3.exceptions.TestException]", o.toString());
assertTrue(NotificationLite.isError(o));
assertFalse(NotificationLite.isComplete(o));
assertFalse(NotificationLite.isDisposable(o));
assertFalse(NotificationLite.isSubscription(o));
assertTrue(NotificationLite.getError(o) instanceof TestException);
}
Reported by PMD.
src/test/java/io/reactivex/rxjava3/internal/operators/single/SingleCreateTest.java
38 issues
Line: 30
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
import io.reactivex.rxjava3.testsupport.*;
public class SingleCreateTest extends RxJavaTest {
@Test
@SuppressUndeliverable
public void basic() {
final Disposable d = Disposable.empty();
Reported by PMD.
Line: 51
.test()
.assertResult(1);
assertTrue(d.isDisposed());
}
@Test
@SuppressUndeliverable
public void basicWithCancellable() {
Reported by PMD.
Line: 51
.test()
.assertResult(1);
assertTrue(d.isDisposed());
}
@Test
@SuppressUndeliverable
public void basicWithCancellable() {
Reported by PMD.
Line: 56
@Test
@SuppressUndeliverable
public void basicWithCancellable() {
final Disposable d1 = Disposable.empty();
final Disposable d2 = Disposable.empty();
Single.<Integer>create(new SingleOnSubscribe<Integer>() {
@Override
Reported by PMD.
Line: 80
.test()
.assertResult(1);
assertTrue(d1.isDisposed());
assertTrue(d2.isDisposed());
}
@Test
@SuppressUndeliverable
Reported by PMD.
Line: 80
.test()
.assertResult(1);
assertTrue(d1.isDisposed());
assertTrue(d2.isDisposed());
}
@Test
@SuppressUndeliverable
Reported by PMD.
Line: 81
.assertResult(1);
assertTrue(d1.isDisposed());
assertTrue(d2.isDisposed());
}
@Test
@SuppressUndeliverable
public void basicWithError() {
Reported by PMD.
Line: 81
.assertResult(1);
assertTrue(d1.isDisposed());
assertTrue(d2.isDisposed());
}
@Test
@SuppressUndeliverable
public void basicWithError() {
Reported by PMD.
Line: 102
.test()
.assertFailure(TestException.class);
assertTrue(d.isDisposed());
}
@Test(expected = IllegalArgumentException.class)
public void unsafeCreate() {
Single.unsafeCreate(Single.just(1));
Reported by PMD.
Line: 102
.test()
.assertFailure(TestException.class);
assertTrue(d.isDisposed());
}
@Test(expected = IllegalArgumentException.class)
public void unsafeCreate() {
Single.unsafeCreate(Single.just(1));
Reported by PMD.