You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just had a similar issue to #11010. I declared an @Endpoint kotlin class with a method with a @Selector parameter, but the parameter name is "lost in compilation".
I noticed that, for Java classes, this is normally not an issue, because Spring Boot configures maven-compiler-plugin to include parameter name information in bytecode (#9323), and we can definitely do the same for kotlin-maven-plugin by providing a -java-parameters argument in its configuration.
How to reproduce
Add the following kotlin code into a standard Spring Boot project with maven (ensure you have spring-boot-starter-tests):
I just had a similar issue to #11010. I declared an
@Endpoint
kotlin class with a method with a@Selector
parameter, but the parameter name is "lost in compilation".I noticed that, for Java classes, this is normally not an issue, because Spring Boot configures
maven-compiler-plugin
to include parameter name information in bytecode (#9323), and we can definitely do the same forkotlin-maven-plugin
by providing a-java-parameters
argument in its configuration.How to reproduce
spring-boot-starter-tests
):mvn clean test
How to fix
Kotlin compiler (
kotlinc
) supports a-java-parameters
argument that was introduced in version 1.1 (https://kotlinlang.org/docs/reference/whatsnew11.html#parameter-names-in-the-bytecode):The text was updated successfully, but these errors were encountered: