Expected Behavior
Functions that take a class as a parameter could be written in a idiomatic kotlin way like
addFilterAt<BasicAuthenticationFilter>(myFilter) also removing some noise.
Current Behavior
The current version of the function takes a java class as a parameter:
addFilterAt(myFilter, BasicAuthenticationFilter::class.java)
Context
When using any Kotlin DSL I don't expect to pass a java class as a parameter. Normally you would pass Kotlins KClass (BasicAuthenticationFilter::class) or use the even more idiomatic way of with a generic reified type. That's also embraced in other parts of Spring like the RestTemplate that for example has an extension functions for post (postForObject
Comment From: eleftherias
Thanks for the report @gonozalviii! Would you be interested in submitting a PR for this?
Comment From: gonozalviii
Yes I can create a PR.
I assume the new functions should be added, and the old functions should be kept?
Comment From: eleftherias
@gonozalviii Yes, please keep the old functions for backwards compatibility.