Skip to content

Polish Kotlin DSL addFilterBefore to use reified type parameter#18838

Closed
jyx-07 wants to merge 2 commits intospring-projects:mainfrom
jyx-07:fix/kotlin-addFilterBefore-signature
Closed

Polish Kotlin DSL addFilterBefore to use reified type parameter#18838
jyx-07 wants to merge 2 commits intospring-projects:mainfrom
jyx-07:fix/kotlin-addFilterBefore-signature

Conversation

@jyx-07
Copy link
Copy Markdown

@jyx-07 jyx-07 commented Mar 3, 2026

Fixes #17993

Update addFilterBefore extension function parameter type from Filter to T
to ensure type safety and maintain consistency with the reified type parameter in Kotlin DSL.

Before:

inline fun <reified T : Filter> addFilterBefore(filter: Filter) {
    this.addFilterBefore(filter, beforeFilter = T::class.java)
}

After:

inline fun <reified T : Filter> addFilterBefore(filter: T) {
    this.addFilterBefore(filter, beforeFilter = T::class.java)
}
```****

jyx-07 added 2 commits March 3, 2026 17:03
…2 client

Signed-off-by: C0ng_yun <s25069@gsm.hs.kr>
Kotlin DSL

Signed-off-by: C0ng_yun <s25069@gsm.hs.kr>
@jyx-07 jyx-07 force-pushed the fix/kotlin-addFilterBefore-signature branch from 9f0bc4c to 6414909 Compare March 3, 2026 08:03
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 3, 2026
@jyx-07 jyx-07 force-pushed the fix/kotlin-addFilterBefore-signature branch from 02972dd to 6414909 Compare March 17, 2026 08:14
@jzheaux
Copy link
Copy Markdown
Contributor

jzheaux commented Mar 23, 2026

Thanks for the contribution, @jyx-07. I'm closing this in favor of #18967, please see #17993 (comment) for why I feel like this isn't the right move.

@jzheaux jzheaux closed this Mar 23, 2026
@jzheaux jzheaux added in: config An issue in spring-security-config status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 23, 2026
@jzheaux jzheaux self-assigned this Mar 23, 2026
@jyx-07 jyx-07 deleted the fix/kotlin-addFilterBefore-signature branch March 23, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: config An issue in spring-security-config status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect definition of addFilterBefore for kotlin

3 participants