diff --git a/spring-integration-core/src/main/java/org/springframework/integration/endpoint/ReactiveConsumer.java b/spring-integration-core/src/main/java/org/springframework/integration/endpoint/ReactiveConsumer.java index 8cba3675ff..4161bc3220 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/endpoint/ReactiveConsumer.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/endpoint/ReactiveConsumer.java @@ -139,7 +139,7 @@ public class ReactiveConsumer extends AbstractEndpoint { } - private static class SubscribableChannelPublisherAdapter + private final static class SubscribableChannelPublisherAdapter implements Publisher>, Subscriber>, Subscription { private final DirectProcessor> delegate = DirectProcessor.create(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java index 0b84229f77..37402d59b2 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/AbstractMessageHandler.java @@ -168,7 +168,7 @@ public abstract class AbstractMessageHandler extends IntegrationObjectSupport im @Override public void onComplete() { - System.out.println("onComplete()"); + } protected abstract void handleMessageInternal(Message message) throws Exception; diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/reactive/TestSubscriber.java b/spring-integration-test/src/main/java/org/springframework/integration/test/reactive/TestSubscriber.java index c47dd1d88e..8d027cbd78 100644 --- a/spring-integration-test/src/main/java/org/springframework/integration/test/reactive/TestSubscriber.java +++ b/spring-integration-test/src/main/java/org/springframework/integration/test/reactive/TestSubscriber.java @@ -156,8 +156,6 @@ public class TestSubscriber * @param timeout the timeout duration * @param errorMessageSupplier the error message supplier * @param conditionSupplier condition to break out of the wait loop - * - * @throws AssertionError */ public static void await(Duration timeout, Supplier errorMessageSupplier, BooleanSupplier conditionSupplier) { @@ -192,8 +190,6 @@ public class TestSubscriber * @param timeout the timeout duration * @param errorMessage the error message * @param conditionSupplier condition to break out of the wait loop - * - * @throws AssertionError */ public static void await(Duration timeout, final String errorMessage, @@ -351,7 +347,7 @@ public class TestSubscriber Iterator expected = expectedValues.iterator(); - for (; ; ) { + while (true) { boolean n2 = expected.hasNext(); if (n2) { T t2 = expected.next(); @@ -638,7 +634,7 @@ public class TestSubscriber Iterator actual = values.iterator(); Iterator expected = expectedSequence.iterator(); int i = 0; - for (; ; ) { + while (true) { boolean n1 = actual.hasNext(); boolean n2 = expected.hasNext(); if (n1 && n2) { @@ -834,7 +830,7 @@ public class TestSubscriber }, () -> valueCount >= (nextValueAssertedCount + expectedValueCount)); List nextValuesSnapshot; List empty = new ArrayList<>(); - for (; ; ) { + while (true) { nextValuesSnapshot = values; if (NEXT_VALUES.compareAndSet(this, values, empty)) { break; @@ -899,7 +895,7 @@ public class TestSubscriber @Override public void onNext(T t) { if (establishedFusionMode == Fuseable.ASYNC) { - for (; ; ) { + while (true) { t = qs.poll(); if (t == null) { break; @@ -907,7 +903,7 @@ public class TestSubscriber valueCount++; if (valuesStorage) { List nextValuesSnapshot; - for (; ; ) { + while (true) { nextValuesSnapshot = values; nextValuesSnapshot.add(t); if (NEXT_VALUES.compareAndSet(this, @@ -923,7 +919,7 @@ public class TestSubscriber valueCount++; if (valuesStorage) { List nextValuesSnapshot; - for (; ; ) { + while (true) { nextValuesSnapshot = values; nextValuesSnapshot.add(t); if (NEXT_VALUES.compareAndSet(this, @@ -956,7 +952,7 @@ public class TestSubscriber establishedFusionMode = m; if (m == Fuseable.SYNC) { - for (; ; ) { + while (true) { T v = qs.poll(); if (v == null) { onComplete(); @@ -1054,7 +1050,7 @@ public class TestSubscriber /** * Atomically sets the single subscription and requests the missed amount from it. * - * @param s + * @param s the Subscription to set. * @return false if this arbiter is cancelled or there was a subscription already set */ protected final boolean set(Subscription s) { @@ -1099,7 +1095,7 @@ public class TestSubscriber */ protected final boolean setWithoutRequesting(Subscription s) { Objects.requireNonNull(s, "s"); - for (; ; ) { + while (true) { Subscription a = this.s; if (a == Operators.cancelledSubscription()) { s.cancel();