Skip to content

Commit 99fa9dd

Browse files
committed
Support Kotlin Context Parameters
Signed-off-by: SIMULATAN <[email protected]>
1 parent 15c5cf4 commit 99fa9dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-core/src/main/java/org/springframework/core/CoroutinesUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public static Publisher<?> invokeSuspendingFunction(
125125
for (KParameter parameter : function.getParameters()) {
126126
switch (parameter.getKind()) {
127127
case INSTANCE -> argMap.put(parameter, target);
128-
case VALUE, EXTENSION_RECEIVER -> {
128+
case VALUE, EXTENSION_RECEIVER, CONTEXT -> {
129129
Object arg = args[index];
130130
if (!(parameter.isOptional() && arg == null)) {
131131
KType type = parameter.getType();

spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private static class KotlinDelegate {
316316
for (KParameter parameter : function.getParameters()) {
317317
switch (parameter.getKind()) {
318318
case INSTANCE -> argMap.put(parameter, target);
319-
case VALUE, EXTENSION_RECEIVER -> {
319+
case VALUE, EXTENSION_RECEIVER, CONTEXT -> {
320320
Object arg = args[index];
321321
if (!(parameter.isOptional() && arg == null)) {
322322
KType type = parameter.getType();

0 commit comments

Comments
 (0)