@Test public void predicateCrash() { TestSubscriber<Integer> ts = new TestSubscriber<>(); Multi.create(Collections.singletonList(1)) .filter(v -> { throw new IllegalArgumentException(); }) .subscribe(ts); ts.requestMax(); assertThat(ts.getSubcription(), is(notNullValue())); assertThat(ts.getItems().isEmpty(), is(true)); assertThat(ts.getLastError(), instanceOf(IllegalArgumentException.class)); assertThat(ts.isComplete(), is(false)); }
@Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new FilterSubscriber<>(subscriber, predicate)); }
MultiFilterPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new FilterSubscriber<>(subscriber, predicate)); } }
MultiFilterPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new FilterSubscriber<>(subscriber, predicate)); } MultiFilterPublisher(Multi<T> source, Predicate<? super T> predicate); }
MultiFilterPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new FilterSubscriber<>(subscriber, predicate)); } MultiFilterPublisher(Multi<T> source, Predicate<? super T> predicate); @Override void subscribe(Flow.Subscriber<? super T> subscriber); }
MultiFilterPublisher implements Multi<T> { @Override public void subscribe(Flow.Subscriber<? super T> subscriber) { source.subscribe(new FilterSubscriber<>(subscriber, predicate)); } MultiFilterPublisher(Multi<T> source, Predicate<? super T> predicate); @Override void subscribe(Flow.Subscriber<? super T> subscriber);  }