From e58741b6cb35f041a65c1791597e72007fc73b01 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 25 Oct 2021 13:28:31 +0200 Subject: [PATCH] Polishing related to merginng the previous commit as well as upgrade of Kotlin libs --- spring-cloud-function-context/pom.xml | 4 ++-- .../catalog/BeanFactoryAwareFunctionRegistryTests.java | 8 +++++--- spring-cloud-function-kotlin/pom.xml | 4 ++-- .../function-sample-kotlin-web/pom.xml | 3 +++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/spring-cloud-function-context/pom.xml b/spring-cloud-function-context/pom.xml index 3233746af..fb23fec49 100644 --- a/spring-cloud-function-context/pom.xml +++ b/spring-cloud-function-context/pom.xml @@ -120,7 +120,7 @@ kotlin-maven-plugin org.jetbrains.kotlin - 1.4.21 + 1.6.0-RC -Xjsr305=strict @@ -159,7 +159,7 @@ org.jetbrains.kotlin kotlin-maven-allopen - 1.4.21 + 1.6.0-RC diff --git a/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistryTests.java b/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistryTests.java index 58c298e93..91bd06857 100644 --- a/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistryTests.java +++ b/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistryTests.java @@ -880,9 +880,11 @@ public class BeanFactoryAwareFunctionRegistryTests { @SuppressWarnings("unchecked") @Override - protected Object doApply(Message input, FunctionInvocationWrapper targetFunction) { - MessageBuilder.fromMessage(input).setHeader("before", "foo").build(); - Message result = (Message) targetFunction.apply(MessageBuilder.fromMessage(input).setHeader("before", "foo").build()); + protected Object doApply(Object input, FunctionInvocationWrapper targetFunction) { + // in this test we know input is a Message + Message mInput = (Message) input; + MessageBuilder.fromMessage(mInput).setHeader("before", "foo").build(); + Message result = (Message) targetFunction.apply(MessageBuilder.fromMessage(mInput).setHeader("before", "foo").build()); return MessageBuilder.fromMessage(result).setHeader("after", "bar").build(); } }; diff --git a/spring-cloud-function-kotlin/pom.xml b/spring-cloud-function-kotlin/pom.xml index b87165efb..d7c524263 100644 --- a/spring-cloud-function-kotlin/pom.xml +++ b/spring-cloud-function-kotlin/pom.xml @@ -64,7 +64,7 @@ kotlin-maven-plugin org.jetbrains.kotlin - 1.4.21 + 1.6.0-RC -Xjsr305=strict @@ -93,7 +93,7 @@ org.jetbrains.kotlin kotlin-maven-allopen - 1.4.21 + 1.6.0-RC diff --git a/spring-cloud-function-samples/function-sample-kotlin-web/pom.xml b/spring-cloud-function-samples/function-sample-kotlin-web/pom.xml index a96818ab4..311a1cb6f 100644 --- a/spring-cloud-function-samples/function-sample-kotlin-web/pom.xml +++ b/spring-cloud-function-samples/function-sample-kotlin-web/pom.xml @@ -28,10 +28,12 @@ org.jetbrains.kotlin kotlin-reflect + 1.6.0-RC org.jetbrains.kotlin kotlin-stdlib-jdk8 + 1.6.0-RC org.springframework.cloud @@ -77,6 +79,7 @@ org.jetbrains.kotlin kotlin-maven-plugin + 1.6.0-RC -Xjsr305=strict