Skip to content

Commit 627a797

Browse files
committed
GH-3800: Fix Kotlin docs for route() DSL
Fixes #3800 * Mention `Message` as a type for reified generic argument in Kotlin DSL docs **Cherry-pick to `5.5.x`**
1 parent 5a92d1f commit 627a797

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spring-integration-core/src/main/kotlin/org/springframework/integration/dsl/KotlinIntegrationFlowDefinition.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@ class KotlinIntegrationFlowDefinition(@PublishedApi internal val delegate: Integ
145145

146146

147147
/**
148-
* Inline function for [IntegrationFlowDefinition.filter] providing a `filter<MyTypeIn>()` variant
148+
* Inline function for [IntegrationFlowDefinition.route] providing a `route<MyTypeIn>()` variant
149149
* with reified generic type.
150150
*/
151151
inline fun <reified P> route(crossinline function: (P) -> Any?) {
152152
route(function) { }
153153
}
154154

155155
/**
156-
* Inline function for [IntegrationFlowDefinition.filter] providing a `filter<MyTypeIn>()` variant
156+
* Inline function for [IntegrationFlowDefinition.route] providing a `route<MyTypeIn>()` variant
157157
* with reified generic type.
158158
*/
159159
inline fun <reified P, T> route(

src/reference/asciidoc/kotlin-dsl.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ fun convertFlow() =
9393
----
9494
====
9595

96+
NOTE: The reified type can be a whole `Message<*>` if there need access to headers as well in the lambda of the operator.
9697

0 commit comments

Comments
 (0)