Skip to content

Commit 75cfd19

Browse files
authored
Merge pull request #1155 from VictorPongolino/typo-doc-fix
Doc and Javadoc typos fix
2 parents a1918be + d417740 commit 75cfd19

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ The `MessageRoutingCallback` is a strategy to assist with determining the name o
195195
[source, java]
196196
----
197197
public interface MessageRoutingCallback {
198-
FunctionRoutingResult routingResult(Message<?> message);
199-
. . .
198+
default String routingResult(Message<?> message) {
199+
return (String) message.getHeaders().get(FunctionProperties.FUNCTION_DEFINITION);
200+
}
200201
}
201202
----
202203

@@ -739,4 +740,4 @@ private final static JsonMasker masker = JsonMasker.INSTANCE();
739740
. . .
740741
741742
logger.info("Received: " + masker.mask(new String(payload, StandardCharsets.UTF_8)));
742-
----
743+
----

spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/MessageRoutingCallback.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public interface MessageRoutingCallback {
3434

3535
/**
36-
* Computes and returns the instance of {@link FunctionRoutingResult} which encapsulates,
36+
* Computes and returns the instance of {@link String} which encapsulates,
3737
* at the very minimum, function definition.
3838
* <br><br>
3939
* Providing such message is primarily an optimization feature. It could be useful for cases
@@ -42,7 +42,7 @@ public interface MessageRoutingCallback {
4242
* message for downstream use didn't exist, resulting in repeated transformation, type conversion etc.
4343
*
4444
* @param message input message
45-
* @return instance of {@link FunctionRoutingResult} containing the result of the routing computation
45+
* @return instance of {@link String} containing the result of the routing computation
4646
*/
4747
default String routingResult(Message<?> message) {
4848
return (String) message.getHeaders().get(FunctionProperties.FUNCTION_DEFINITION);

0 commit comments

Comments
 (0)