From bb91fd3cb3d56cf930e8c4f4bcfe3939eb11f0b8 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Tue, 5 Jul 2022 16:12:16 -0400 Subject: [PATCH] Some documentations clean up --- .../springframework/integration/dsl/IntegrationFlow.java | 8 ++++---- .../springframework/integration/dsl/IntegrationFlows.java | 2 +- src/reference/asciidoc/whats-new.adoc | 8 +++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java index 7b9a9a5191..96c076dcc2 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/IntegrationFlow.java @@ -156,7 +156,7 @@ public interface IntegrationFlow { /** * Populate the {@link MessageChannel} name to the new {@link IntegrationFlowBuilder} chain. - * Typically for the {@link org.springframework.integration.channel.FixedSubscriberChannel} together + * Typically, for the {@link org.springframework.integration.channel.FixedSubscriberChannel} together * with {@code fixedSubscriber = true}. * The {@link IntegrationFlow} {@code inputChannel}. * @param messageChannelName the name for {@link DirectChannel} or @@ -215,6 +215,7 @@ public interface IntegrationFlow { */ static IntegrationFlowBuilder from(MessageSourceSpec> messageSourceSpec, Consumer endpointConfigurer) { + Assert.notNull(messageSourceSpec, "'messageSourceSpec' must not be null"); return from(messageSourceSpec.get(), endpointConfigurer, registerComponents(messageSourceSpec)); } @@ -248,7 +249,7 @@ public interface IntegrationFlow { Consumer endpointConfigurer) { Assert.notNull(messageSource, "'messageSource' must not be null"); - return from(new AbstractMessageSource() { + return from(new AbstractMessageSource<>() { @Override protected Object doReceive() { @@ -497,10 +498,9 @@ public interface IntegrationFlow { @SuppressWarnings("unchecked") private static T extractProxyTarget(T target) { - if (!(target instanceof Advised)) { + if (!(target instanceof Advised advised)) { return target; } - Advised advised = (Advised) target; try { return (T) extractProxyTarget(advised.getTargetSource().getTarget()); } 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 56393baf14..b4f07d1e9b 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 @@ -41,7 +41,7 @@ import org.springframework.messaging.MessageChannel; * * @see org.springframework.integration.dsl.context.IntegrationFlowBeanPostProcessor * - * @deprecated Since version 6.0, this factory is not recommended to use as it shall be removed in the following versions. Use fluent API methods straight from {@link IntegrationFlow} interface. + * @deprecated since version 6.0 in favor of fluent API methods straight from {@link IntegrationFlow} interface. */ @Deprecated(since = "6.0", forRemoval = true) public final class IntegrationFlows { diff --git a/src/reference/asciidoc/whats-new.adoc b/src/reference/asciidoc/whats-new.adoc index a2963d2a4d..2fb9dd6092 100644 --- a/src/reference/asciidoc/whats-new.adoc +++ b/src/reference/asciidoc/whats-new.adoc @@ -50,6 +50,8 @@ See <<./aggregator.adoc#aggregator,Aggregator>> for more information. The `IntegrationFlows` factory is now marked as deprecated in favor of the fluent API available in the `IntegrationFlow` interface itself. The factory class will be removed in the future releases. +See <<./dsl.adoc#java-dsl,Java DSL>> for more information. + [[x6.0-http]] === HTTP Changes @@ -74,6 +76,10 @@ See <<./kafka.adoc#kafka,Spring for Apache Kafka Support>> for more information. The `DefaultLockRepository` can now be supplied with a `PlatformTransactionManager` instead of relying on the primary bean from the application context. +See <<./jdbc.adoc#jdbc-lock-registry,JDBC Lock Registry>> for more information. + === TCP/IP Changes -The `lookupHost` property of the `AbstractConnectionFactory` and `DatagramPacketMessageMapper` is now set to `false` by default to avoid delays in the environments where DNS is not configured. \ No newline at end of file +The `lookupHost` property of the `AbstractConnectionFactory` and `DatagramPacketMessageMapper` is now set to `false` by default to avoid delays in the environments where DNS is not configured. + +See <<./ip.adoc#ip,TCP and UDP Support>> for more information.