From cc288a0c4a1fbfa01fe4e18e915ff9567464dd83 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 8 Aug 2016 15:52:16 -0400 Subject: [PATCH] Switch back to Reactor 3.0 snapshots --- build.gradle | 5 +++-- .../org/springframework/core/io/buffer/DataBufferUtils.java | 2 +- .../web/reactive/result/method/InvocableHandlerMethod.java | 5 +++-- .../http/server/reactive/ChannelSendOperatorTests.java | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 72a344d5f65..48363f10291 100644 --- a/build.gradle +++ b/build.gradle @@ -74,8 +74,8 @@ configure(allprojects) { project -> ext.protobufVersion = "3.0.0" ext.reactivestreamsVersion = "1.0.0" ext.reactorVersion = "2.0.8.RELEASE" - ext.reactorCoreVersion = '3.0.0.RC1' - ext.reactorNettyVersion = '0.5.0.M2' + ext.reactorCoreVersion = '3.0.0.BUILD-SNAPSHOT' + ext.reactorNettyVersion = '0.5.0.BUILD-SNAPSHOT' ext.romeVersion = "1.6.0" ext.rxjavaVersion = '1.1.8' ext.rxnettyVersion = '0.5.2-rc.3' @@ -160,6 +160,7 @@ configure(allprojects) { project -> repositories { maven { url "https://repo.spring.io/libs-release" } maven { url "https://repo.spring.io/milestone" } + maven { url "https://repo.spring.io/snapshot" } // Reactor 3 snapshots } dependencies { diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java index 5af8f2568bf..a519449d823 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java @@ -184,7 +184,7 @@ public abstract class DataBufferUtils { } } catch (IOException ex) { - sub.fail(ex); + sub.error(ex); } return channel; } diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java index 48c0d5cc1a6..48945eb9b0d 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java @@ -138,8 +138,9 @@ public class InvocableHandlerMethod extends HandlerMethod { }) .collect(Collectors.toList()); - return Mono.when(monos).log("reactor.unresolved").map(args -> - Stream.of(args).map(o -> o != NO_VALUE ? o : null).toArray()); + // Create Mono with array of resolved values... + return Mono.when(monos, + args -> Stream.of(args).map(o -> o != NO_VALUE ? o : null).toArray()); } catch (Throwable ex) { return Mono.error(ex); diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java index 0d29488e84e..27fb35b8f37 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java @@ -114,7 +114,7 @@ public class ChannelSendOperatorTests { int i = ++idx; subscriber.next(String.valueOf(i)); if (i == 3) { - subscriber.fail(error); + subscriber.error(error); } return i; });