target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void nextCancelRace() { for (int i = 0; i < 500; i++) { final PublishProcessor<Integer> ps = PublishProcessor.create(); final ConnectableFlowable<Integer> co = ps.publish(); final TestSubscriber<Integer> to = co.test(); Runnable r1 = new Runnable() { @Override public void run() { ps.onNext(1); } }; Runnabl...
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize); return RxJavaFlowablePlugins.onAssembly(new FlowablePublish<T...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
@Test public void noErrorLoss() { List<Throwable> errors = TestCommonHelper.trackPluginErrors(); try { ConnectableFlowable<Object> co = Flowable.error(new TestException()).publish(); co.connect(); TestCommonHelper.assertUndeliverable(errors, 0, TestException.class); } finally { RxJavaCommonPlugins.reset(); } }
@Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(current, bufferSize); if (!current.compareAndSet(ps, u)) { continue; } ps = u; } doCo...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
@Test public void selectorDisconnectsIndependentSource() { PublishProcessor<Integer> ps = PublishProcessor.create(); ps.publish(new Function<Flowable<Integer>, Flowable<Integer>>() { @Override public Flowable<Integer> apply(Flowable<Integer> v) throws Exception { return Flowable.range(1, 2); } }) .test() .assertResult(...
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize); return RxJavaFlowablePlugins.onAssembly(new FlowablePublish<T...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
@Test public void selectorInnerError() { PublishProcessor<Integer> ps = PublishProcessor.create(); ps.publish(new Function<Flowable<Integer>, Flowable<Integer>>() { @Override public Flowable<Integer> apply(Flowable<Integer> v) throws Exception { return Flowable.error(new TestException()); } }) .test() .assertFailure(Te...
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize); return RxJavaFlowablePlugins.onAssembly(new FlowablePublish<T...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
@Test public void preNextConnect() { for (int i = 0; i < 500; i++) { final ConnectableFlowable<Integer> co = Flowable.<Integer>empty().publish(); co.connect(); Runnable r1 = new Runnable() { @Override public void run() { co.test(); } }; TestCommonHelper.race(r1, r1); } }
@Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(current, bufferSize); if (!current.compareAndSet(ps, u)) { continue; } ps = u; } doCo...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
@Test public void connectRace() { for (int i = 0; i < 500; i++) { final ConnectableFlowable<Integer> co = Flowable.<Integer>empty().publish(); Runnable r1 = new Runnable() { @Override public void run() { co.connect(); } }; TestCommonHelper.race(r1, r1); } }
@Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(current, bufferSize); if (!current.compareAndSet(ps, u)) { continue; } ps = u; } doCo...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
@Test public void overflowQueue() { Flowable.create(new FlowableOnSubscribe<Object>() { @Override public void subscribe(FlowableEmitter<Object> s) throws Exception { for (int i = 0; i < 10; i++) { s.onNext(i); } } }, BackpressureStrategy.MISSING) .publish(8) .autoConnect() .test(0L) .assertFailure(MissingBackpressureEx...
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize); return RxJavaFlowablePlugins.onAssembly(new FlowablePublish<T...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) { final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>(); Publisher<T> onSubscribe = new FlowablePublisher...
@Test public void delayedUpstreamOnSubscribe() { final Subscriber<?>[] sub = { null }; new Flowable<Integer>() { @Override protected void subscribeActual(Subscriber<? super Integer> s) { sub[0] = s; } } .publish() .connect() .dispose(); BooleanSubscription bs = new BooleanSubscription(); sub[0].onSubscribe(bs); assertT...
@Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(current, bufferSize); if (!current.compareAndSet(ps, u)) { continue; } ps = u; } doCo...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
FlowablePublish extends ConnectableFlowable<T> implements HasUpstreamPublisher<T> { @Override public void connect(Consumer<? super Disposable> connection) { boolean doConnect; PublishSubscriber<T> ps; for (;;) { ps = current.get(); if (ps == null || ps.isDisposed()) { PublishSubscriber<T> u = new PublishSubscriber<T>(c...
@Test public void compare() { assertEquals(-1, ObjectHelper.compare(0, 2)); assertEquals(0, ObjectHelper.compare(0, 0)); assertEquals(1, ObjectHelper.compare(2, 0)); }
public static int compare(int v1, int v2) { return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); }
ObjectHelper { public static int compare(int v1, int v2) { return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); } }
ObjectHelper { public static int compare(int v1, int v2) { return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); } private ObjectHelper(); }
ObjectHelper { public static int compare(int v1, int v2) { return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); } private ObjectHelper(); static T requireNonNull(T object, String message); static boolean equals(Object o1, Object o2); static int hashCode(Object o); static int compare(int v1, int v2); static int compare(long v1, lo...
ObjectHelper { public static int compare(int v1, int v2) { return v1 < v2 ? -1 : (v1 > v2 ? 1 : 0); } private ObjectHelper(); static T requireNonNull(T object, String message); static boolean equals(Object o1, Object o2); static int hashCode(Object o); static int compare(int v1, int v2); static int compare(long v1, lo...
@Test public void periodicDirectTaskRace() { final TestScheduler scheduler = new TestScheduler(); for (int i = 0; i < 100; i++) { final Disposable d = scheduler.schedulePeriodicallyDirect(Functions.EMPTY_RUNNABLE, 1, 1, TimeUnit.MILLISECONDS); Runnable r1 = new Runnable() { @Override public void run() { d.dispose(); } ...
@NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w); Disposable...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
@SuppressWarnings("unchecked") @Test public void shouldNotInvokeFuncUntilSubscription() throws Exception { Callable<Object> func = mock(Callable.class); when(func.call()).thenReturn(new Object()); Flowable<Object> fromCallableFlowable = Flowable.fromCallable(func); verifyZeroInteractions(func); fromCallableFlowable.sub...
@Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
@SuppressWarnings("unchecked") @Test public void shouldCallOnNextAndOnCompleted() throws Exception { Callable<String> func = mock(Callable.class); when(func.call()).thenReturn("test_value"); Flowable<String> fromCallableFlowable = Flowable.fromCallable(func); Subscriber<String> observer = TestHelper.mockSubscriber(); f...
@Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
@SuppressWarnings("unchecked") @Test public void shouldCallOnError() throws Exception { Callable<Object> func = mock(Callable.class); Throwable throwable = new IllegalStateException("Test exception"); when(func.call()).thenThrow(throwable); Flowable<Object> fromCallableFlowable = Flowable.fromCallable(func); Subscriber...
@Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
@SuppressWarnings("unchecked") @Test public void shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission() throws Exception { Callable<String> func = mock(Callable.class); final CountDownLatch funcLatch = new CountDownLatch(1); final CountDownLatch observerLatch = new CountDownLatch(1); when(func.call()).thenAnswe...
@Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); }
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
FlowableFromCallable extends Flowable<T> implements Callable<T> { @Override public T call() throws Exception { return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value"); } FlowableFromCallable(Callable<? extends T> callable); @Override void subscribeActual(Subscriber<? super T> s); @Over...
@Test public void testTake() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>(); FlowableCache<Integer> cached = new FlowableCache<Integer>(Flowable.range(1, 100), 16); cached.take(10).subscribe(ts); ts.assertNoErrors(); ts.assertComplete(); ts.assertValues(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); assertFalse(cached.h...
boolean hasSubscribers() { return state.subscribers.get().length != 0; }
FlowableCache extends AbstractFlowableWithUpstream<T, T> { boolean hasSubscribers() { return state.subscribers.get().length != 0; } }
FlowableCache extends AbstractFlowableWithUpstream<T, T> { boolean hasSubscribers() { return state.subscribers.get().length != 0; } FlowableCache(Flowable<T> source, int capacityHint); }
FlowableCache extends AbstractFlowableWithUpstream<T, T> { boolean hasSubscribers() { return state.subscribers.get().length != 0; } FlowableCache(Flowable<T> source, int capacityHint); }
FlowableCache extends AbstractFlowableWithUpstream<T, T> { boolean hasSubscribers() { return state.subscribers.get().length != 0; } FlowableCache(Flowable<T> source, int capacityHint); }
@SuppressWarnings("unchecked") @Test public void source() { Flowable<Integer> o = Flowable.just(1); assertSame(o, ((HasUpstreamPublisher<Integer>)o.map(Functions.<Integer>identity())).source()); }
@Override public final Publisher<T> source() { return source; }
AbstractFlowableWithUpstream extends Flowable<R> implements HasUpstreamPublisher<T> { @Override public final Publisher<T> source() { return source; } }
AbstractFlowableWithUpstream extends Flowable<R> implements HasUpstreamPublisher<T> { @Override public final Publisher<T> source() { return source; } AbstractFlowableWithUpstream(Flowable<T> source); }
AbstractFlowableWithUpstream extends Flowable<R> implements HasUpstreamPublisher<T> { @Override public final Publisher<T> source() { return source; } AbstractFlowableWithUpstream(Flowable<T> source); @Override final Publisher<T> source(); }
AbstractFlowableWithUpstream extends Flowable<R> implements HasUpstreamPublisher<T> { @Override public final Publisher<T> source() { return source; } AbstractFlowableWithUpstream(Flowable<T> source); @Override final Publisher<T> source(); }
@Test public void onlyFirstShouldSubscribeAndLastUnsubscribe() { final AtomicInteger subscriptionCount = new AtomicInteger(); final AtomicInteger unsubscriptionCount = new AtomicInteger(); Flowable<Integer> observable = Flowable.unsafeCreate(new Publisher<Integer>() { @Override public void subscribe(Subscriber<? super ...
private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); @Override void subscribeActual(final S...
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); @Override void subscribeActual(final S...
@Test public void noOpConnect() { final int[] calls = { 0 }; Flowable<Integer> o = new ConnectableFlowable<Integer>() { @Override public void connect(Consumer<? super Disposable> connection) { calls[0]++; } @Override protected void subscribeActual(Subscriber<? super Integer> observer) { observer.onSubscribe(new Boolean...
private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); }
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); @Override void subscribeActual(final S...
FlowableRefCount extends AbstractFlowableWithUpstream<T, T> { private Consumer<Disposable> onSubscribe(final Subscriber<? super T> subscriber, final AtomicBoolean writeLocked) { return new DisposeConsumer(subscriber, writeLocked); } FlowableRefCount(ConnectableFlowable<T> source); @Override void subscribeActual(final S...
@SuppressWarnings("unchecked") @Test public void errorConditionalBackpressured() { TestSubscriber<Object> ts = new TestSubscriber<Object>(0L); Flowable.error(new TestException()) .parallel(1) .runOn(ImmediateThinScheduler.INSTANCE) .filter(Functions.alwaysTrue()) .subscribe(new Subscriber[] { ts }); ts .assertFailure(T...
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@SuppressWarnings("unchecked") @Test public void emptyConditionalBackpressured() { TestSubscriber<Object> ts = new TestSubscriber<Object>(0L); Flowable.empty() .parallel(1) .runOn(ImmediateThinScheduler.INSTANCE) .filter(Functions.alwaysTrue()) .subscribe(new Subscriber[] { ts }); ts .assertResult(); }
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@Test public void booleanSupplierPredicateReverse() throws Exception { BooleanSupplier s = new BooleanSupplier() { @Override public boolean getAsBoolean() throws Exception { return false; } }; assertTrue(Functions.predicateReverseFor(s).test(1)); s = new BooleanSupplier() { @Override public boolean getAsBoolean() throw...
public static <T> Predicate<T> predicateReverseFor(BooleanSupplier supplier) { return new BooleanSupplierPredicateReverse<T>(supplier); }
Functions { public static <T> Predicate<T> predicateReverseFor(BooleanSupplier supplier) { return new BooleanSupplierPredicateReverse<T>(supplier); } }
Functions { public static <T> Predicate<T> predicateReverseFor(BooleanSupplier supplier) { return new BooleanSupplierPredicateReverse<T>(supplier); } private Functions(); }
Functions { public static <T> Predicate<T> predicateReverseFor(BooleanSupplier supplier) { return new BooleanSupplierPredicateReverse<T>(supplier); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f); static Function<Object[], R> toFunction(final Func...
Functions { public static <T> Predicate<T> predicateReverseFor(BooleanSupplier supplier) { return new BooleanSupplierPredicateReverse<T>(supplier); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f); static Function<Object[], R> toFunction(final Func...
@SuppressWarnings("unchecked") @Test public void nextCancelRaceBackpressured() { for (int i = 0; i < 1000; i++) { final PublishProcessor<Integer> pp = PublishProcessor.create(); final TestSubscriber<Integer> ts = TestSubscriber.create(0L); pp.parallel(1) .runOn(Schedulers.computation()) .subscribe(new Subscriber[] { ts...
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@SuppressWarnings("unchecked") @Test public void nextCancelRaceBackpressuredConditional() { for (int i = 0; i < 1000; i++) { final PublishProcessor<Integer> pp = PublishProcessor.create(); final TestSubscriber<Integer> ts = TestSubscriber.create(0L); pp.parallel(1) .runOn(Schedulers.computation()) .filter(Functions.alw...
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@SuppressWarnings("unchecked") @Test public void normalCancelAfterRequest1() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>(1) { @Override public void onNext(Integer t) { super.onNext(t); cancel(); onComplete(); } }; Flowable.range(1, 5) .parallel(1) .runOn(ImmediateThinScheduler.INSTANCE) .subscribe(new Su...
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@SuppressWarnings("unchecked") @Test public void conditionalCancelAfterRequest1() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>(1) { @Override public void onNext(Integer t) { super.onNext(t); cancel(); onComplete(); } }; Flowable.range(1, 5) .parallel(1) .runOn(ImmediateThinScheduler.INSTANCE) .filter(Func...
@Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { Subscriber<? super T> a = subscribers[i]; Wor...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
ParallelRunOn extends ParallelFlowable<T> { @Override public void subscribe(Subscriber<? super T>[] subscribers) { if (!validate(subscribers)) { return; } int n = subscribers.length; @SuppressWarnings("unchecked") Subscriber<T>[] parents = new Subscriber[n]; int prefetch = this.prefetch; for (int i = 0; i < n; i++) { S...
@Test public void testAddCap() { assertEquals(2L, BackpressureHelper.addCap(1, 1)); assertEquals(Long.MAX_VALUE, BackpressureHelper.addCap(1, Long.MAX_VALUE - 1)); assertEquals(Long.MAX_VALUE, BackpressureHelper.addCap(1, Long.MAX_VALUE)); assertEquals(Long.MAX_VALUE, BackpressureHelper.addCap(Long.MAX_VALUE - 1, Long....
public static long addCap(long a, long b) { long u = a + b; if (u < 0L) { return Long.MAX_VALUE; } return u; }
BackpressureHelper { public static long addCap(long a, long b) { long u = a + b; if (u < 0L) { return Long.MAX_VALUE; } return u; } }
BackpressureHelper { public static long addCap(long a, long b) { long u = a + b; if (u < 0L) { return Long.MAX_VALUE; } return u; } private BackpressureHelper(); }
BackpressureHelper { public static long addCap(long a, long b) { long u = a + b; if (u < 0L) { return Long.MAX_VALUE; } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, long n); static long addCancel(AtomicLong ...
BackpressureHelper { public static long addCap(long a, long b) { long u = a + b; if (u < 0L) { return Long.MAX_VALUE; } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, long n); static long addCancel(AtomicLong ...
@Test public void testMultiplyCap() { assertEquals(6, BackpressureHelper.multiplyCap(2, 3)); assertEquals(Long.MAX_VALUE, BackpressureHelper.multiplyCap(2, Long.MAX_VALUE)); assertEquals(Long.MAX_VALUE, BackpressureHelper.multiplyCap(Long.MAX_VALUE, Long.MAX_VALUE)); assertEquals(Long.MAX_VALUE, BackpressureHelper.mult...
public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, lo...
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, lo...
@Test public void producedMore() { List<Throwable> list = TestCommonHelper.trackPluginErrors(); try { AtomicLong requested = new AtomicLong(1); assertEquals(0, BackpressureHelper.produced(requested, 2)); TestCommonHelper.assertError(list, 0, IllegalStateException.class, "More produced than requested: -1"); } finally { ...
public static long produced(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateException("More produced than requested: " + update)); update = 0L; }...
BackpressureHelper { public static long produced(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateException("More produced than requested: " + upd...
BackpressureHelper { public static long produced(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateException("More produced than requested: " + upd...
BackpressureHelper { public static long produced(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateException("More produced than requested: " + upd...
BackpressureHelper { public static long produced(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateException("More produced than requested: " + upd...
@Test public void producedMoreCancel() { List<Throwable> list = TestCommonHelper.trackPluginErrors(); try { AtomicLong requested = new AtomicLong(1); assertEquals(0, BackpressureHelper.producedCancel(requested, 2)); TestCommonHelper.assertError(list, 0, IllegalStateException.class, "More produced than requested: -1"); ...
public static long producedCancel(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MIN_VALUE) { return Long.MIN_VALUE; } if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(new IllegalStateExcep...
BackpressureHelper { public static long producedCancel(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MIN_VALUE) { return Long.MIN_VALUE; } if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(...
BackpressureHelper { public static long producedCancel(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MIN_VALUE) { return Long.MIN_VALUE; } if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(...
BackpressureHelper { public static long producedCancel(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MIN_VALUE) { return Long.MIN_VALUE; } if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(...
BackpressureHelper { public static long producedCancel(AtomicLong requested, long n) { for (;;) { long current = requested.get(); if (current == Long.MIN_VALUE) { return Long.MIN_VALUE; } if (current == Long.MAX_VALUE) { return Long.MAX_VALUE; } long update = current - n; if (update < 0L) { RxJavaCommonPlugins.onError(...
@Test public void multiplyCap() { assertEquals(Long.MAX_VALUE, BackpressureHelper.multiplyCap(3, Long.MAX_VALUE >> 1)); assertEquals(Long.MAX_VALUE, BackpressureHelper.multiplyCap(1, Long.MAX_VALUE)); }
public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); }
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, lo...
BackpressureHelper { public static long multiplyCap(long a, long b) { long u = a * b; if (((a | b) >>> 31) != 0) { if (u / a != b) { return Long.MAX_VALUE; } } return u; } private BackpressureHelper(); static long addCap(long a, long b); static long multiplyCap(long a, long b); static long add(AtomicLong requested, lo...
@Test public void checkDoubleDefaultSubscriber() { Subscriber<Integer> consumer = new DefaultSubscriber<Integer>() { @Override public void onNext(Integer t) { } @Override public void onError(Throwable t) { } @Override public void onComplete() { } }; BooleanSubscription sub1 = new BooleanSubscription(); consumer.onSubsc...
public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
@Test(expected = IllegalArgumentException.class) public void toFunction2() throws Exception { Functions.toFunction(new BiFunction<Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2) throws Exception { return null; } }).apply(new Object[20]); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test public void checkDoubleDefaultSubscriberNonAnonymous() { Subscriber<Integer> consumer = new EndDefaultSubscriber(); BooleanSubscription sub1 = new BooleanSubscription(); consumer.onSubscribe(sub1); assertFalse(sub1.isCancelled()); BooleanSubscription sub2 = new BooleanSubscription(); consumer.onSubscribe(sub2); a...
public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
@Test public void checkDoubleDisposableSubscriber() { Subscriber<Integer> consumer = new DisposableSubscriber<Integer>() { @Override public void onNext(Integer t) { } @Override public void onError(Throwable t) { } @Override public void onComplete() { } }; BooleanSubscription sub1 = new BooleanSubscription(); consumer.o...
public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
@Test public void checkDoubleResourceSubscriber() { Subscriber<Integer> consumer = new ResourceSubscriber<Integer>() { @Override public void onNext(Integer t) { } @Override public void onError(Throwable t) { } @Override public void onComplete() { } }; BooleanSubscription sub1 = new BooleanSubscription(); consumer.onSub...
public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); }
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
EndSubscriberHelper { public static String composeMessage(String consumer) { return "It is not allowed to subscribe with a(n) " + consumer + " multiple times. " + "Please create a fresh instance of " + consumer + " and subscribe that to the target source instead."; } private EndSubscriberHelper(); static boolean valid...
@Test public void validateSubscription() { BooleanSubscription d1 = new BooleanSubscription(); assertFalse(EndSubscriberHelper.validate(SubscriptionHelper.CANCELLED, d1, getClass())); assertTrue(d1.isCancelled()); assertTrue(errors.toString(), errors.isEmpty()); }
public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) { ObjectHelper.requireNonNull(next, "next is null"); if (upstream != null) { next.cancel(); if (upstream != SubscriptionHelper.CANCELLED) { reportDoubleSubscription(subscriber); } return false; } return true; }
EndSubscriberHelper { public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) { ObjectHelper.requireNonNull(next, "next is null"); if (upstream != null) { next.cancel(); if (upstream != SubscriptionHelper.CANCELLED) { reportDoubleSubscription(subscriber); } return false; } return t...
EndSubscriberHelper { public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) { ObjectHelper.requireNonNull(next, "next is null"); if (upstream != null) { next.cancel(); if (upstream != SubscriptionHelper.CANCELLED) { reportDoubleSubscription(subscriber); } return false; } return t...
EndSubscriberHelper { public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) { ObjectHelper.requireNonNull(next, "next is null"); if (upstream != null) { next.cancel(); if (upstream != SubscriptionHelper.CANCELLED) { reportDoubleSubscription(subscriber); } return false; } return t...
EndSubscriberHelper { public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) { ObjectHelper.requireNonNull(next, "next is null"); if (upstream != null) { next.cancel(); if (upstream != SubscriptionHelper.CANCELLED) { reportDoubleSubscription(subscriber); } return false; } return t...
@Test public void isCancelled() { assertTrue(QueueDrainHelper.isCancelled(new BooleanSupplier() { @Override public boolean getAsBoolean() throws Exception { throw new IOException(); } })); }
static boolean isCancelled(BooleanSupplier cancelled) { try { return cancelled.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return true; } }
QueueDrainHelper { static boolean isCancelled(BooleanSupplier cancelled) { try { return cancelled.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return true; } } }
QueueDrainHelper { static boolean isCancelled(BooleanSupplier cancelled) { try { return cancelled.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return true; } } private QueueDrainHelper(); }
QueueDrainHelper { static boolean isCancelled(BooleanSupplier cancelled) { try { return cancelled.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return true; } } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, D...
QueueDrainHelper { static boolean isCancelled(BooleanSupplier cancelled) { try { return cancelled.getAsBoolean(); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); return true; } } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, D...
@Test public void requestMaxInt() { QueueDrainHelper.request(new Subscription() { @Override public void request(long n) { assertEquals(Integer.MAX_VALUE, n); } @Override public void cancel() { } }, Integer.MAX_VALUE); }
public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
@Test public void requestMinInt() { QueueDrainHelper.request(new Subscription() { @Override public void request(long n) { assertEquals(Long.MAX_VALUE, n); } @Override public void cancel() { } }, Integer.MIN_VALUE); }
public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
@Test public void requestAlmostMaxInt() { QueueDrainHelper.request(new Subscription() { @Override public void request(long n) { assertEquals(Integer.MAX_VALUE - 1, n); } @Override public void cancel() { } }, Integer.MAX_VALUE - 1); }
public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); }
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
QueueDrainHelper { public static void request(Subscription s, int prefetch) { s.request(prefetch < 0 ? Long.MAX_VALUE : prefetch); } private QueueDrainHelper(); static void drainMaxLoop(SimplePlainQueue<T> q, Subscriber<? super U> a, boolean delayError, Disposable dispose, QueueDrain<T, U> qd); static bool...
@Test public void postCompleteEmpty() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>(); ArrayDeque<Integer> queue = new ArrayDeque<Integer>(); AtomicLong state = new AtomicLong(); BooleanSupplier isCancelled = new BooleanSupplier() { @Override public boolean getAsBoolean() throws Exception { return false; }...
public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get(); if ((r & COMPLETE...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
@Test public void postCompleteWithRequest() { TestSubscriber<Integer> ts = new TestSubscriber<Integer>(); ArrayDeque<Integer> queue = new ArrayDeque<Integer>(); AtomicLong state = new AtomicLong(); BooleanSupplier isCancelled = new BooleanSupplier() { @Override public boolean getAsBoolean() throws Exception { return fa...
public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get(); if ((r & COMPLETE...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
QueueDrainHelper { public static <T> void postComplete(Subscriber<? super T> actual, Queue<T> queue, AtomicLong state, BooleanSupplier isCancelled) { if (queue.isEmpty()) { actual.onComplete(); return; } if (postCompleteDrain(state.get(), actual, queue, state, isCancelled)) { return; } for (; ; ) { long r = state.get()...
@Test(expected = IllegalArgumentException.class) public void toFunction3() throws Exception { Functions.toFunction(new Function3<Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3) throws Exception { return null; } }).apply(new Object[20]); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test public void source() { Maybe<Integer> m = Maybe.just(1); assertSame(m, (((HasUpstreamMaybeSource<?>)toFlowable(m)).source())); }
@Override public MaybeSource<T> source() { return source; }
MaybeToFlowable extends Flowable<T> implements HasUpstreamMaybeSource<T> { @Override public MaybeSource<T> source() { return source; } }
MaybeToFlowable extends Flowable<T> implements HasUpstreamMaybeSource<T> { @Override public MaybeSource<T> source() { return source; } MaybeToFlowable(MaybeSource<T> source); }
MaybeToFlowable extends Flowable<T> implements HasUpstreamMaybeSource<T> { @Override public MaybeSource<T> source() { return source; } MaybeToFlowable(MaybeSource<T> source); @Override MaybeSource<T> source(); }
MaybeToFlowable extends Flowable<T> implements HasUpstreamMaybeSource<T> { @Override public MaybeSource<T> source() { return source; } MaybeToFlowable(MaybeSource<T> source); @Override MaybeSource<T> source(); }
@Test(expected = IllegalArgumentException.class) public void toFunction4() throws Exception { Functions.toFunction(new Function4<Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4) throws Exception { return null; } }).apply(new Object[20]); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test(expected = IllegalArgumentException.class) public void toFunction5() throws Exception { Functions.toFunction(new Function5<Integer, Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5) throws Exception { return null; } }).apply...
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test(expected = IllegalArgumentException.class) public void toFunction6() throws Exception { Functions.toFunction(new Function6<Integer, Integer, Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5, Integer t6) throws Exception { re...
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test(expected = IllegalArgumentException.class) public void toFunction7() throws Exception { Functions.toFunction(new Function7<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5, Integer t6, Integer t7) ...
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test(expected = IllegalArgumentException.class) public void toFunction8() throws Exception { Functions.toFunction(new Function8<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5, Integer t6, Int...
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test(expected = IllegalArgumentException.class) public void toFunction9() throws Exception { Functions.toFunction(new Function9<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>() { @Override public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5, Intege...
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void biFunctionFail() throws Exception { BiFunction biFunction = null; Functions.toFunction(biFunction); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test public void periodicDirectTaskRaceIO() throws Exception { final Scheduler scheduler = Schedulers.io(); for (int i = 0; i < 100; i++) { final Disposable d = scheduler.schedulePeriodicallyDirect( Functions.EMPTY_RUNNABLE, 0, 0, TimeUnit.MILLISECONDS); Thread.sleep(1); d.dispose(); } }
@NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w); Disposable...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function3Fail() throws Exception { Function3 function3 = null; Functions.toFunction(function3); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function4Fail() throws Exception { Function4 function4 = null; Functions.toFunction(function4); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function5Fail() throws Exception { Function5 function5 = null; Functions.toFunction(function5); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function6Fail() throws Exception { Function6 function6 = null; Functions.toFunction(function6); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function7Fail() throws Exception { Function7 function7 = null; Functions.toFunction(function7); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function8Fail() throws Exception { Function8 function8 = null; Functions.toFunction(function8); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@SuppressWarnings({"unchecked", "rawtypes"}) @Test(expected = NullPointerException.class) public void function9Fail() throws Exception { Function9 function9 = null; Functions.toFunction(function9); }
public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); }
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
Functions { public static <T1, T2, R> Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f) { ObjectHelper.requireNonNull(f, "f is null"); return new Array2Func<T1, T2, R>(f); } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? e...
@Test public void identityFunctionToString() { assertEquals("IdentityFunction", Functions.identity().toString()); }
@SuppressWarnings("unchecked") public static <T> Function<T, T> identity() { return (Function<T, T>)IDENTITY; }
Functions { @SuppressWarnings("unchecked") public static <T> Function<T, T> identity() { return (Function<T, T>)IDENTITY; } }
Functions { @SuppressWarnings("unchecked") public static <T> Function<T, T> identity() { return (Function<T, T>)IDENTITY; } private Functions(); }
Functions { @SuppressWarnings("unchecked") public static <T> Function<T, T> identity() { return (Function<T, T>)IDENTITY; } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f); static Function<Object[], R> toFunction(final Function3<T1, T2, T3, R> f); s...
Functions { @SuppressWarnings("unchecked") public static <T> Function<T, T> identity() { return (Function<T, T>)IDENTITY; } private Functions(); static Function<Object[], R> toFunction(final BiFunction<? super T1, ? super T2, ? extends R> f); static Function<Object[], R> toFunction(final Function3<T1, T2, T3, R> f); s...
@SuppressWarnings({ "rawtypes" }) @Test public void lockdown() throws Exception { RxJavaCommonPlugins.reset(); RxJavaCommonPlugins.lockdown(); try { assertTrue(RxJavaCommonPlugins.isLockdown()); Consumer a1 = Functions.emptyConsumer(); Callable f0 = new Callable() { @Override public Object call() { return null; } }; Fu...
public static void lockdown() { lockdown = true; }
RxJavaCommonPlugins { public static void lockdown() { lockdown = true; } }
RxJavaCommonPlugins { public static void lockdown() { lockdown = true; } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { public static void lockdown() { lockdown = true; } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailOnNonBlockingScheduler(boolean enable); static boolean isFailOnNonBlockingScheduler(); @Nullable static Function<? super Scheduler, ? extends S...
RxJavaCommonPlugins { public static void lockdown() { lockdown = true; } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailOnNonBlockingScheduler(boolean enable); static boolean isFailOnNonBlockingScheduler(); @Nullable static Function<? super Scheduler, ? extends S...
@Test public void overrideInitSingleSchedulerCrashes() { try { RxJavaCommonPlugins.initSingleScheduler(null); fail("Should have thrown NullPointerException"); } catch (NullPointerException npe) { assertEquals("Scheduler Callable can't be null", npe.getMessage()); } try { RxJavaCommonPlugins.initSingleScheduler(nullResu...
@NonNull public static Scheduler initSingleScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitSingleHandler; if (f == null) { return callRequireNonNull(defaultS...
RxJavaCommonPlugins { @NonNull public static Scheduler initSingleScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitSingleHandler; if (f == null) { return callR...
RxJavaCommonPlugins { @NonNull public static Scheduler initSingleScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitSingleHandler; if (f == null) { return callR...
RxJavaCommonPlugins { @NonNull public static Scheduler initSingleScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitSingleHandler; if (f == null) { return callR...
RxJavaCommonPlugins { @NonNull public static Scheduler initSingleScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitSingleHandler; if (f == null) { return callR...
@Test public void scheduleDirectThrows() throws Exception { List<Throwable> list = TestCommonHelper.trackPluginErrors(); try { Schedulers.io().scheduleDirect(new Runnable() { @Override public void run() { throw new TestException(); } }); Thread.sleep(250); assertEquals(1, list.size()); TestCommonHelper.assertUndelivera...
@NonNull public Disposable scheduleDirect(@NonNull Runnable run) { return scheduleDirect(run, 0L, TimeUnit.NANOSECONDS); }
Scheduler { @NonNull public Disposable scheduleDirect(@NonNull Runnable run) { return scheduleDirect(run, 0L, TimeUnit.NANOSECONDS); } }
Scheduler { @NonNull public Disposable scheduleDirect(@NonNull Runnable run) { return scheduleDirect(run, 0L, TimeUnit.NANOSECONDS); } }
Scheduler { @NonNull public Disposable scheduleDirect(@NonNull Runnable run) { return scheduleDirect(run, 0L, TimeUnit.NANOSECONDS); } static long clockDriftTolerance(); @NonNull abstract Worker createWorker(); long now(@NonNull TimeUnit unit); void start(); void shutdown(); @NonNull Disposable scheduleDirect(@NonNull...
Scheduler { @NonNull public Disposable scheduleDirect(@NonNull Runnable run) { return scheduleDirect(run, 0L, TimeUnit.NANOSECONDS); } static long clockDriftTolerance(); @NonNull abstract Worker createWorker(); long now(@NonNull TimeUnit unit); void start(); void shutdown(); @NonNull Disposable scheduleDirect(@NonNull...
@Test public void overrideInitComputationSchedulerCrashes() { try { RxJavaCommonPlugins.initComputationScheduler(null); fail("Should have thrown NullPointerException"); } catch (NullPointerException npe) { assertEquals("Scheduler Callable can't be null", npe.getMessage()); } try { RxJavaCommonPlugins.initComputationSch...
@NonNull public static Scheduler initComputationScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitComputationHandler; if (f == null) { return callRequireNonNul...
RxJavaCommonPlugins { @NonNull public static Scheduler initComputationScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitComputationHandler; if (f == null) { re...
RxJavaCommonPlugins { @NonNull public static Scheduler initComputationScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitComputationHandler; if (f == null) { re...
RxJavaCommonPlugins { @NonNull public static Scheduler initComputationScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitComputationHandler; if (f == null) { re...
RxJavaCommonPlugins { @NonNull public static Scheduler initComputationScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitComputationHandler; if (f == null) { re...
@Test public void overrideInitIoSchedulerCrashes() { try { RxJavaCommonPlugins.initIoScheduler(null); fail("Should have thrown NullPointerException"); } catch (NullPointerException npe) { assertEquals("Scheduler Callable can't be null", npe.getMessage()); } try { RxJavaCommonPlugins.initIoScheduler(nullResultCallable);...
@NonNull public static Scheduler initIoScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitIoHandler; if (f == null) { return callRequireNonNull(defaultScheduler...
RxJavaCommonPlugins { @NonNull public static Scheduler initIoScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitIoHandler; if (f == null) { return callRequireNo...
RxJavaCommonPlugins { @NonNull public static Scheduler initIoScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitIoHandler; if (f == null) { return callRequireNo...
RxJavaCommonPlugins { @NonNull public static Scheduler initIoScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitIoHandler; if (f == null) { return callRequireNo...
RxJavaCommonPlugins { @NonNull public static Scheduler initIoScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitIoHandler; if (f == null) { return callRequireNo...
@Test public void overrideInitNewThreadSchedulerCrashes() { try { RxJavaCommonPlugins.initNewThreadScheduler(null); fail("Should have thrown NullPointerException"); } catch (NullPointerException npe) { assertEquals("Scheduler Callable can't be null", npe.getMessage()); } try { RxJavaCommonPlugins.initNewThreadScheduler...
@NonNull public static Scheduler initNewThreadScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitNewThreadHandler; if (f == null) { return callRequireNonNull(de...
RxJavaCommonPlugins { @NonNull public static Scheduler initNewThreadScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitNewThreadHandler; if (f == null) { return...
RxJavaCommonPlugins { @NonNull public static Scheduler initNewThreadScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitNewThreadHandler; if (f == null) { return...
RxJavaCommonPlugins { @NonNull public static Scheduler initNewThreadScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitNewThreadHandler; if (f == null) { return...
RxJavaCommonPlugins { @NonNull public static Scheduler initNewThreadScheduler(@NonNull Callable<Scheduler> defaultScheduler) { ObjectHelper.requireNonNull(defaultScheduler, "Scheduler Callable can't be null"); Function<? super Callable<Scheduler>, ? extends Scheduler> f = onInitNewThreadHandler; if (f == null) { return...
@Test public void onScheduleComputation() throws InterruptedException { onSchedule(Schedulers.computation().createWorker()); }
@NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
@Test public void onScheduleIO() throws InterruptedException { onSchedule(Schedulers.io().createWorker()); }
@NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
@Test public void onScheduleNewThread() throws InterruptedException { onSchedule(Schedulers.newThread().createWorker()); }
@NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
RxJavaCommonPlugins { @NonNull public static Runnable onSchedule(@NonNull Runnable run) { Function<? super Runnable, ? extends Runnable> f = onScheduleHandler; if (f == null) { return run; } return apply(f, run); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailO...
@Test public void onError() { try { final List<Throwable> list = new ArrayList<Throwable>(); RxJavaCommonPlugins.setErrorHandler(new Consumer<Throwable>() { @Override public void accept(Throwable t) { list.add(t); } }); RxJavaCommonPlugins.onError(new TestException("Forced failure")); assertEquals(1, list.size()); asse...
public static void onError(@NonNull Throwable error) { Consumer<? super Throwable> f = errorHandler; if (error == null) { error = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } else { if (!isBug(error)) { error = new UndeliverableException(er...
RxJavaCommonPlugins { public static void onError(@NonNull Throwable error) { Consumer<? super Throwable> f = errorHandler; if (error == null) { error = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } else { if (!isBug(error)) { error = new Und...
RxJavaCommonPlugins { public static void onError(@NonNull Throwable error) { Consumer<? super Throwable> f = errorHandler; if (error == null) { error = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } else { if (!isBug(error)) { error = new Und...
RxJavaCommonPlugins { public static void onError(@NonNull Throwable error) { Consumer<? super Throwable> f = errorHandler; if (error == null) { error = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } else { if (!isBug(error)) { error = new Und...
RxJavaCommonPlugins { public static void onError(@NonNull Throwable error) { Consumer<? super Throwable> f = errorHandler; if (error == null) { error = new NullPointerException("onError called with null. Null values are generally not allowed in 2.x operators and sources."); } else { if (!isBug(error)) { error = new Und...
@Test public void createComputationScheduler() { final String name = "ComputationSchedulerTest"; ThreadFactory factory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { return new Thread(r, name); } }; final Scheduler customScheduler = RxJavaCommonPlugins.createComputationScheduler(factory); RxJav...
@NonNull public static Scheduler createComputationScheduler(@NonNull ThreadFactory threadFactory) { return new ComputationScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); }
RxJavaCommonPlugins { @NonNull public static Scheduler createComputationScheduler(@NonNull ThreadFactory threadFactory) { return new ComputationScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } }
RxJavaCommonPlugins { @NonNull public static Scheduler createComputationScheduler(@NonNull ThreadFactory threadFactory) { return new ComputationScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Scheduler createComputationScheduler(@NonNull ThreadFactory threadFactory) { return new ComputationScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static vo...
RxJavaCommonPlugins { @NonNull public static Scheduler createComputationScheduler(@NonNull ThreadFactory threadFactory) { return new ComputationScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static vo...
@Test public void createIoScheduler() { final String name = "IoSchedulerTest"; ThreadFactory factory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { return new Thread(r, name); } }; final Scheduler customScheduler = RxJavaCommonPlugins.createIoScheduler(factory); RxJavaCommonPlugins.setIoSchedul...
@NonNull public static Scheduler createIoScheduler(@NonNull ThreadFactory threadFactory) { return new IoScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); }
RxJavaCommonPlugins { @NonNull public static Scheduler createIoScheduler(@NonNull ThreadFactory threadFactory) { return new IoScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } }
RxJavaCommonPlugins { @NonNull public static Scheduler createIoScheduler(@NonNull ThreadFactory threadFactory) { return new IoScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Scheduler createIoScheduler(@NonNull ThreadFactory threadFactory) { return new IoScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailOnNonBlo...
RxJavaCommonPlugins { @NonNull public static Scheduler createIoScheduler(@NonNull ThreadFactory threadFactory) { return new IoScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void setFailOnNonBlo...
@Test public void createNewThreadScheduler() { final String name = "NewThreadSchedulerTest"; ThreadFactory factory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { return new Thread(r, name); } }; final Scheduler customScheduler = RxJavaCommonPlugins.createNewThreadScheduler(factory); RxJavaCommo...
@NonNull public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); }
RxJavaCommonPlugins { @NonNull public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } }
RxJavaCommonPlugins { @NonNull public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); }
RxJavaCommonPlugins { @NonNull public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void s...
RxJavaCommonPlugins { @NonNull public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); } private RxJavaCommonPlugins(); static void lockdown(); static boolean isLockdown(); static void s...
@Test public void defaultSchedulePeriodicallyDirectRejects() { Scheduler s = new Scheduler() { @NonNull @Override public Worker createWorker() { return new Worker() { @NonNull @Override public Disposable schedule(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) { return Scheduler.REJECTED; } @Override public ...
@NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w); Disposable...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
Scheduler { @NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaCommonPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(decoratedRun, w)...
@Test public void getPreviewHeight() throws Exception { assertEquals(pixabayImage.getPreviewHeight(), 180); }
public int getPreviewHeight() { return previewHeight; }
PixabayImage { public int getPreviewHeight() { return previewHeight; } }
PixabayImage { public int getPreviewHeight() { return previewHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previe...
PixabayImage { public int getPreviewHeight() { return previewHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previe...
PixabayImage { public int getPreviewHeight() { return previewHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previe...
@Test public void getPageURL() throws Exception { assertEquals(pixabayImage.getPageURL(), "http: }
public String getPageURL() { return pageURL; }
PixabayImage { public String getPageURL() { return pageURL; } }
PixabayImage { public String getPageURL() { return pageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public String getPageURL() { return pageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public String getPageURL() { return pageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getPreviewURL() throws Exception { assertEquals(pixabayImage.getPreviewURL(), "http: }
public String getPreviewURL() { return previewURL; }
PixabayImage { public String getPreviewURL() { return previewURL; } }
PixabayImage { public String getPreviewURL() { return previewURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewUR...
PixabayImage { public String getPreviewURL() { return previewURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewUR...
PixabayImage { public String getPreviewURL() { return previewURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewUR...
@Test public void getWebformatURL() throws Exception { assertEquals(pixabayImage.getWebformatURL(), "http: }
public String getWebformatURL() { return webformatURL; }
PixabayImage { public String getWebformatURL() { return webformatURL; } }
PixabayImage { public String getWebformatURL() { return webformatURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
PixabayImage { public String getWebformatURL() { return webformatURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
PixabayImage { public String getWebformatURL() { return webformatURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
@Test public void getImageWidth() throws Exception { assertEquals(pixabayImage.getImageWidth(), 1080); }
public int getImageWidth() { return imageWidth; }
PixabayImage { public int getImageWidth() { return imageWidth; } }
PixabayImage { public int getImageWidth() { return imageWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public int getImageWidth() { return imageWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public int getImageWidth() { return imageWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getUserId() throws Exception { assertEquals(pixabayImage.getUserId(), 123456); }
public long getUserId() { return userId; }
PixabayImage { public long getUserId() { return userId; } }
PixabayImage { public long getUserId() { return userId; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getUserId() { return userId; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getUserId() { return userId; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getUser() throws Exception { assertEquals(pixabayImage.getUser(), "By: user"); }
public String getUser() { return "By: " + user; }
PixabayImage { public String getUser() { return "By: " + user; } }
PixabayImage { public String getUser() { return "By: " + user; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public String getUser() { return "By: " + user; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public String getUser() { return "By: " + user; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getType() throws Exception { assertEquals(pixabayImage.getType(), PixabayImageType.illustration); }
public PixabayImageType getType() { return type; }
PixabayImage { public PixabayImageType getType() { return type; } }
PixabayImage { public PixabayImageType getType() { return type; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL,...
PixabayImage { public PixabayImageType getType() { return type; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL,...
PixabayImage { public PixabayImageType getType() { return type; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL,...
@Test public void getId() throws Exception { assertEquals(pixabayImage.getId(), 987654); }
public long getId() { return id; }
PixabayImage { public long getId() { return id; } }
PixabayImage { public long getId() { return id; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getId() { return id; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getId() { return id; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getUserImageURL() throws Exception { assertEquals(pixabayImage.getUserImageURL(), "http: }
public String getUserImageURL() { return userImageURL; }
PixabayImage { public String getUserImageURL() { return userImageURL; } }
PixabayImage { public String getUserImageURL() { return userImageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
PixabayImage { public String getUserImageURL() { return userImageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
PixabayImage { public String getUserImageURL() { return userImageURL; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previ...
@Test public void getImageHeight() throws Exception { assertEquals(pixabayImage.getImageHeight(), 1024); }
public int getImageHeight() { return imageHeight; }
PixabayImage { public int getImageHeight() { return imageHeight; } }
PixabayImage { public int getImageHeight() { return imageHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL...
PixabayImage { public int getImageHeight() { return imageHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL...
PixabayImage { public int getImageHeight() { return imageHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL...
@Test public void getLikes() throws Exception { assertEquals(pixabayImage.getLikes(), "100"); }
public String getLikes() { return String.valueOf(likes); }
PixabayImage { public String getLikes() { return String.valueOf(likes); } }
PixabayImage { public String getLikes() { return String.valueOf(likes); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pre...
PixabayImage { public String getLikes() { return String.valueOf(likes); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pre...
PixabayImage { public String getLikes() { return String.valueOf(likes); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pre...
@Test public void getFavorites() throws Exception { assertEquals(pixabayImage.getFavorites(), "50"); }
public String getFavorites() { return String.valueOf(favorites); }
PixabayImage { public String getFavorites() { return String.valueOf(favorites); } }
PixabayImage { public String getFavorites() { return String.valueOf(favorites); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, St...
PixabayImage { public String getFavorites() { return String.valueOf(favorites); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, St...
PixabayImage { public String getFavorites() { return String.valueOf(favorites); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, St...
@Test public void getTags() throws Exception { assertEquals(pixabayImage.getTags(), null); }
public String getTags() { if (tags == null) return ""; if (tags.contains(", ")) { String[] splitTags = tags.toUpperCase().split(", "); return TextUtils.join(" - ", splitTags); } else return tags; }
PixabayImage { public String getTags() { if (tags == null) return ""; if (tags.contains(", ")) { String[] splitTags = tags.toUpperCase().split(", "); return TextUtils.join(" - ", splitTags); } else return tags; } }
PixabayImage { public String getTags() { if (tags == null) return ""; if (tags.contains(", ")) { String[] splitTags = tags.toUpperCase().split(", "); return TextUtils.join(" - ", splitTags); } else return tags; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webforma...
PixabayImage { public String getTags() { if (tags == null) return ""; if (tags.contains(", ")) { String[] splitTags = tags.toUpperCase().split(", "); return TextUtils.join(" - ", splitTags); } else return tags; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webforma...
PixabayImage { public String getTags() { if (tags == null) return ""; if (tags.contains(", ")) { String[] splitTags = tags.toUpperCase().split(", "); return TextUtils.join(" - ", splitTags); } else return tags; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webforma...
@Test public void getWebformatHeight() throws Exception { assertEquals(pixabayImage.getWebformatHeight(), 90); }
public int getWebformatHeight() { return webformatHeight; }
PixabayImage { public int getWebformatHeight() { return webformatHeight; } }
PixabayImage { public int getWebformatHeight() { return webformatHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pr...
PixabayImage { public int getWebformatHeight() { return webformatHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pr...
PixabayImage { public int getWebformatHeight() { return webformatHeight; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String pr...
@Test public void getViews() throws Exception { assertEquals(pixabayImage.getViews(), 1234); }
public long getViews() { return views; }
PixabayImage { public long getViews() { return views; } }
PixabayImage { public long getViews() { return views; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getViews() { return views; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getViews() { return views; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void getWebformatWidth() throws Exception { assertEquals(pixabayImage.getWebformatWidth(), 360); }
public int getWebformatWidth() { return webformatWidth; }
PixabayImage { public int getWebformatWidth() { return webformatWidth; } }
PixabayImage { public int getWebformatWidth() { return webformatWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String prev...
PixabayImage { public int getWebformatWidth() { return webformatWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String prev...
PixabayImage { public int getWebformatWidth() { return webformatWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String prev...
@Test public void getPreviewWidth() throws Exception { assertEquals(pixabayImage.getPreviewWidth(), 180); }
public int getPreviewWidth() { return previewWidth; }
PixabayImage { public int getPreviewWidth() { return previewWidth; } }
PixabayImage { public int getPreviewWidth() { return previewWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewU...
PixabayImage { public int getPreviewWidth() { return previewWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewU...
PixabayImage { public int getPreviewWidth() { return previewWidth; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewU...
@Test public void getComments() throws Exception { assertEquals(pixabayImage.getComments(), "150"); }
public String getComments() { return String.valueOf(comments); }
PixabayImage { public String getComments() { return String.valueOf(comments); } }
PixabayImage { public String getComments() { return String.valueOf(comments); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, Stri...
PixabayImage { public String getComments() { return String.valueOf(comments); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, Stri...
PixabayImage { public String getComments() { return String.valueOf(comments); } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, Stri...
@Test public void getDownloads() throws Exception { assertEquals(pixabayImage.getDownloads(), 987); }
public long getDownloads() { return downloads; }
PixabayImage { public long getDownloads() { return downloads; } }
PixabayImage { public long getDownloads() { return downloads; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getDownloads() { return downloads; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
PixabayImage { public long getDownloads() { return downloads; } PixabayImage(int previewHeight, int likes, int favorites, String tags, int webformatHeight, long views, int webformatWidth, int previewWidth, int comments, long downloads, String pageURL, String previewURL, ...
@Test public void prefixedRequestMethodSpanNameFormatsCorrectly() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_METHOD_NAME("ELASTICSEARCH - "); assertEquals("ELASTICSEARCH - GET", spanNameProvider.apply(getRequest)); assertEquals("ELASTICSEARCH - GET", spanNameProvider.app...
public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefi...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefi...
@Test public void prefixedRequestMethodSpanNameHandlesNull() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_METHOD_NAME(null); assertEquals("GET", spanNameProvider.apply(getRequest)); assertEquals("GET", spanNameProvider.apply(getRequestWithID)); assertEquals("GET", spanName...
public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefi...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final String prefi...
@Test public void prefixedRequestTargetSpanNameFormatsCorrectly() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_TARGET_NAME("ELASTICSEARCH - "); assertEquals("ELASTICSEARCH - /twitter/tweet/", spanNameProvider.apply(getRequest)); assertEquals("ELASTICSEARCH - /twitter/tweet...
public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final...
@Test public void prefixedRequestTargetSpanNameHandlesNull() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_TARGET_NAME(null); assertEquals("/twitter/tweet/", spanNameProvider.apply(getRequest)); assertEquals("/twitter/tweet/?", spanNameProvider.apply(getRequestWithID)); ass...
public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_TARGET_NAME(final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); } static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_NAME(final...
@Test public void prefixedRequestMethodTargetSpanNameFormatsCorrectly() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_METHOD_TARGET_NAME("ELASTICSEARCH - "); assertEquals("ELASTICSEARCH - GET /twitter/tweet/", spanNameProvider.apply(getRequest)); assertEquals("ELASTICSEARCH...
public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
@Test public void prefixedRequestMethodTargetSpanNameHandlesNull() { Function<HttpRequest, String> spanNameProvider = ClientSpanNameProvider .PREFIXED_REQUEST_METHOD_TARGET_NAME(null); assertEquals("GET /twitter/tweet/", spanNameProvider.apply(getRequest)); assertEquals("GET /twitter/tweet/?", spanNameProvider.apply(ge...
public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknown"); }
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...
ClientSpanNameProvider { public static Function<HttpRequest, String> PREFIXED_REQUEST_METHOD_TARGET_NAME( final String prefix) { return (request) -> replaceIfNull(prefix, "") + replaceIfNull(request.getRequestLine().getMethod(), "unknown") + " " + replaceIfNull(standardizeUri(request.getRequestLine().getUri()), "unknow...