From d20fbffcd006a069741f43e927c80c4184224b5f Mon Sep 17 00:00:00 2001 From: Stephane Maldini Date: Tue, 29 Sep 2015 23:31:02 +0100 Subject: [PATCH] Update to Reactor 2.1.0.BUILD-SNAPSHOT --- spring-web-reactive/build.gradle | 4 ++-- .../reactive/util/CompletableFutureUtils.java | 5 ++--- .../springframework/reactive/web/http/ReactorHttpServer.java | 3 --- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/spring-web-reactive/build.gradle b/spring-web-reactive/build.gradle index 665a7799a6..4d003ee73a 100644 --- a/spring-web-reactive/build.gradle +++ b/spring-web-reactive/build.gradle @@ -29,14 +29,14 @@ dependencies { compile "org.springframework:spring-core:4.2.0.RELEASE" compile "org.springframework:spring-web:4.2.0.RELEASE" compile "org.reactivestreams:reactive-streams:1.0.0" - compile "io.projectreactor:reactor-stream:2.0.6.BUILD-SNAPSHOT" + compile "io.projectreactor:reactor-stream:2.1.0.BUILD-SNAPSHOT" compile "commons-logging:commons-logging:1.2" compile "com.fasterxml.jackson.core:jackson-databind:2.6.1" optional "io.reactivex:rxnetty:0.5.0-SNAPSHOT" optional "io.reactivex:rxjava-reactive-streams:1.0.1" - optional "io.projectreactor:reactor-net:2.0.6.BUILD-SNAPSHOT" + optional "io.projectreactor:reactor-net:2.1.0.BUILD-SNAPSHOT" provided "javax.servlet:javax.servlet-api:3.1.0" diff --git a/spring-web-reactive/src/main/java/org/springframework/reactive/util/CompletableFutureUtils.java b/spring-web-reactive/src/main/java/org/springframework/reactive/util/CompletableFutureUtils.java index e26afa24e5..3e92ddf717 100644 --- a/spring-web-reactive/src/main/java/org/springframework/reactive/util/CompletableFutureUtils.java +++ b/spring-web-reactive/src/main/java/org/springframework/reactive/util/CompletableFutureUtils.java @@ -23,7 +23,7 @@ import java.util.concurrent.CompletableFuture; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; -import reactor.core.support.Exceptions; +import reactor.core.error.Exceptions; import reactor.rx.Stream; import reactor.rx.action.Action; import reactor.rx.subscription.ReactiveSubscription; @@ -131,8 +131,7 @@ public class CompletableFutureUtils { } }); } catch (Throwable throwable) { - Exceptions.throwIfFatal(throwable); - subscriber.onError(throwable); + Exceptions.publisher(throwable); } } diff --git a/spring-web-reactive/src/test/java/org/springframework/reactive/web/http/ReactorHttpServer.java b/spring-web-reactive/src/test/java/org/springframework/reactive/web/http/ReactorHttpServer.java index 5ed3e75216..028e650137 100644 --- a/spring-web-reactive/src/test/java/org/springframework/reactive/web/http/ReactorHttpServer.java +++ b/spring-web-reactive/src/test/java/org/springframework/reactive/web/http/ReactorHttpServer.java @@ -18,7 +18,6 @@ package org.springframework.reactive.web.http; import org.springframework.beans.factory.InitializingBean; import org.springframework.reactive.web.http.reactor.RequestHandlerAdapter; import org.springframework.util.Assert; -import reactor.Environment; import reactor.bus.selector.Selectors; import reactor.io.buffer.Buffer; import reactor.io.net.NetStreams; @@ -48,8 +47,6 @@ public class ReactorHttpServer extends HttpServerSupport implements Initializing Assert.notNull(getHttpHandler()); this.reactorHandler = new RequestHandlerAdapter(getHttpHandler()); - Environment.initializeIfEmpty(); - this.reactorServer = (getPort() != -1 ? NetStreams.httpServer(getPort()) : NetStreams.httpServer());