Browse Source

Update to Reactor 2.1.0.BUILD-SNAPSHOT

pull/1111/head
Stephane Maldini 9 years ago
parent
commit
d20fbffcd0
  1. 4
      spring-web-reactive/build.gradle
  2. 5
      spring-web-reactive/src/main/java/org/springframework/reactive/util/CompletableFutureUtils.java
  3. 3
      spring-web-reactive/src/test/java/org/springframework/reactive/web/http/ReactorHttpServer.java

4
spring-web-reactive/build.gradle

@ -29,14 +29,14 @@ dependencies {
compile "org.springframework:spring-core:4.2.0.RELEASE" compile "org.springframework:spring-core:4.2.0.RELEASE"
compile "org.springframework:spring-web:4.2.0.RELEASE" compile "org.springframework:spring-web:4.2.0.RELEASE"
compile "org.reactivestreams:reactive-streams:1.0.0" 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 "commons-logging:commons-logging:1.2"
compile "com.fasterxml.jackson.core:jackson-databind:2.6.1" compile "com.fasterxml.jackson.core:jackson-databind:2.6.1"
optional "io.reactivex:rxnetty:0.5.0-SNAPSHOT" optional "io.reactivex:rxnetty:0.5.0-SNAPSHOT"
optional "io.reactivex:rxjava-reactive-streams:1.0.1" 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" provided "javax.servlet:javax.servlet-api:3.1.0"

5
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.Publisher;
import org.reactivestreams.Subscriber; import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription; import org.reactivestreams.Subscription;
import reactor.core.support.Exceptions; import reactor.core.error.Exceptions;
import reactor.rx.Stream; import reactor.rx.Stream;
import reactor.rx.action.Action; import reactor.rx.action.Action;
import reactor.rx.subscription.ReactiveSubscription; import reactor.rx.subscription.ReactiveSubscription;
@ -131,8 +131,7 @@ public class CompletableFutureUtils {
} }
}); });
} catch (Throwable throwable) { } catch (Throwable throwable) {
Exceptions.throwIfFatal(throwable); Exceptions.publisher(throwable);
subscriber.onError(throwable);
} }
} }

3
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.beans.factory.InitializingBean;
import org.springframework.reactive.web.http.reactor.RequestHandlerAdapter; import org.springframework.reactive.web.http.reactor.RequestHandlerAdapter;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import reactor.Environment;
import reactor.bus.selector.Selectors; import reactor.bus.selector.Selectors;
import reactor.io.buffer.Buffer; import reactor.io.buffer.Buffer;
import reactor.io.net.NetStreams; import reactor.io.net.NetStreams;
@ -48,8 +47,6 @@ public class ReactorHttpServer extends HttpServerSupport implements Initializing
Assert.notNull(getHttpHandler()); Assert.notNull(getHttpHandler());
this.reactorHandler = new RequestHandlerAdapter(getHttpHandler()); this.reactorHandler = new RequestHandlerAdapter(getHttpHandler());
Environment.initializeIfEmpty();
this.reactorServer = (getPort() != -1 ? this.reactorServer = (getPort() != -1 ?
NetStreams.httpServer(getPort()) : NetStreams.httpServer(getPort()) :
NetStreams.httpServer()); NetStreams.httpServer());

Loading…
Cancel
Save