From 007e1a0924ab433ef09a9f85896e329bea4e457a Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 30 Sep 2019 15:17:36 -0400 Subject: [PATCH] Improve `in generics` for some `Publisher` API --- .../integration/channel/FluxMessageChannel.java | 4 ++-- .../channel/ReactiveStreamsSubscribableChannel.java | 2 +- .../integration/dsl/IntegrationFlowAdapter.java | 2 +- .../org/springframework/integration/dsl/IntegrationFlows.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/FluxMessageChannel.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/FluxMessageChannel.java index ca2075a2bc..ac914911ae 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/FluxMessageChannel.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/FluxMessageChannel.java @@ -45,7 +45,7 @@ public class FluxMessageChannel extends AbstractMessageChannel private final List>> subscribers = new ArrayList<>(); - private final Map>, ConnectableFlux> publishers = new ConcurrentHashMap<>(); + private final Map>, ConnectableFlux> publishers = new ConcurrentHashMap<>(); private final Flux> flux; @@ -78,7 +78,7 @@ public class FluxMessageChannel extends AbstractMessageChannel } @Override - public void subscribeTo(Publisher> publisher) { + public void subscribeTo(Publisher> publisher) { ConnectableFlux connectableFlux = Flux.from(publisher) .handle((message, sink) -> sink.next(send(message))) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/ReactiveStreamsSubscribableChannel.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/ReactiveStreamsSubscribableChannel.java index a71c8de2de..7a05bf1db0 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/ReactiveStreamsSubscribableChannel.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/ReactiveStreamsSubscribableChannel.java @@ -28,6 +28,6 @@ import org.springframework.messaging.Message; */ public interface ReactiveStreamsSubscribableChannel { - void subscribeTo(Publisher> publisher); + void subscribeTo(Publisher> publisher); } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowAdapter.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowAdapter.java index e053f08d2e..e42b5c51ee 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowAdapter.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlowAdapter.java @@ -228,7 +228,7 @@ public abstract class IntegrationFlowAdapter implements IntegrationFlow, SmartLi return IntegrationFlows.from(serviceInterface, endpointConfigurer); } - protected IntegrationFlowBuilder from(Publisher> publisher) { + protected IntegrationFlowBuilder from(Publisher> publisher) { return IntegrationFlows.from(publisher); } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java index 51a6d8780a..8dbeb44956 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlows.java @@ -367,7 +367,7 @@ public final class IntegrationFlows { * @param publisher the {@link Publisher} to subscribe to. * @return new {@link IntegrationFlowBuilder}. */ - public static IntegrationFlowBuilder from(Publisher> publisher) { + public static IntegrationFlowBuilder from(Publisher> publisher) { FluxMessageChannel reactiveChannel = new FluxMessageChannel(); reactiveChannel.subscribeTo(publisher); return from((MessageChannel) reactiveChannel);