From c7c7422fa30ceeebc882bf02580662fdf3e5f89f Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 22 Jan 2020 15:57:20 -0500 Subject: [PATCH] Fix unused imports violation --- .../channel/MessageChannelReactiveUtils.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java index 65231cbc7e..fd2a9c76d4 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2019 the original author or authors. + * Copyright 2017-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import org.springframework.messaging.SubscribableChannel; import reactor.core.publisher.EmitterProcessor; import reactor.core.publisher.Flux; -import reactor.core.publisher.FluxSink; import reactor.core.scheduler.Schedulers; /** @@ -87,13 +86,13 @@ public final class MessageChannelReactiveUtils { public void subscribe(Subscriber> subscriber) { Flux .>create(sink -> - sink.onRequest(n -> { - Message m; - while (!sink.isCancelled() && n-- > 0 - && (m = this.channel.receive()) != null) { // NOSONAR - sink.next((Message) m); - } - })) + sink.onRequest(n -> { + Message m; + while (!sink.isCancelled() && n-- > 0 + && (m = this.channel.receive()) != null) { // NOSONAR + sink.next((Message) m); + } + })) .subscribeOn(Schedulers.elastic()) .subscribe(subscriber); }