|
|
|
@ -321,7 +321,8 @@ public class InvocableHandlerMethod extends HandlerMethod { |
|
|
|
Object arg = args[index]; |
|
|
|
Object arg = args[index]; |
|
|
|
if (!(parameter.isOptional() && arg == null)) { |
|
|
|
if (!(parameter.isOptional() && arg == null)) { |
|
|
|
KType type = parameter.getType(); |
|
|
|
KType type = parameter.getType(); |
|
|
|
if (!(type.isMarkedNullable() && arg == null) && type.getClassifier() instanceof KClass<?> kClass |
|
|
|
if (!(type.isMarkedNullable() && arg == null) |
|
|
|
|
|
|
|
&& type.getClassifier() instanceof KClass<?> kClass |
|
|
|
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) { |
|
|
|
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) { |
|
|
|
arg = box(kClass, arg); |
|
|
|
arg = box(kClass, arg); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -341,7 +342,8 @@ public class InvocableHandlerMethod extends HandlerMethod { |
|
|
|
private static Object box(KClass<?> kClass, @Nullable Object arg) { |
|
|
|
private static Object box(KClass<?> kClass, @Nullable Object arg) { |
|
|
|
KFunction<?> constructor = Objects.requireNonNull(KClasses.getPrimaryConstructor(kClass)); |
|
|
|
KFunction<?> constructor = Objects.requireNonNull(KClasses.getPrimaryConstructor(kClass)); |
|
|
|
KType type = constructor.getParameters().get(0).getType(); |
|
|
|
KType type = constructor.getParameters().get(0).getType(); |
|
|
|
if (!(type.isMarkedNullable() && arg == null) && type.getClassifier() instanceof KClass<?> parameterClass |
|
|
|
if (!(type.isMarkedNullable() && arg == null) |
|
|
|
|
|
|
|
&& type.getClassifier() instanceof KClass<?> parameterClass |
|
|
|
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(parameterClass))) { |
|
|
|
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(parameterClass))) { |
|
|
|
arg = box(parameterClass, arg); |
|
|
|
arg = box(parameterClass, arg); |
|
|
|
} |
|
|
|
} |
|
|
|
|