-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ConfigMapping fails with default function implementations in interfaces in Kotlin projects #20496
Comments
/cc @evanchooly |
@evanchooly do you know how can we tell if a method has been implemented on Kotlin? In this case, when we look into the method, it shows as abstract so we think that is not implemented and we add it as a configuration item. |
@radcortez the bytecode of the Kotlin interface that I posted would look somewhat like this in Java:
|
Thanks. Let me have a look. |
Have what you need @radcortez ? |
Maybe. I'll need to adjust the code to look for this and ignore the method. Is this the only way that Kotlin provides the implementation? I was looking into https://youtrack.jetbrains.com/issue/KT-4779 |
what bytecode are you seeing that's problematic, exactly? |
No problem at all so far. It is clear. I'm only concerned about the different ways that it behaves depending on the compiler flags, but I'm guessing that we can just ignore that and provide the bridge to the generated defaults if one exists. |
If an interface annotated with
@ConfigMapping
has a default function implementation the application fails on startup.Actual behavior
How to Reproduce?
application.properties
withapplication.yml
with the following content:ServerConfig
interface with the following class:./gradlew quarkusDev
and observer the error.Quarkus version or git rev
2.2.3.Final
The text was updated successfully, but these errors were encountered: