Skip to content
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

Refine KotlinDetector usages and implementation #34275

Closed
sdeleuze opened this issue Jan 16, 2025 · 0 comments
Closed

Refine KotlinDetector usages and implementation #34275

sdeleuze opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Jan 16, 2025

Initially Spring Framework did not required kotlin-reflect in a mandatory way, it does now for some time as documented in the reference documentation, as it is almost impossible to provide a reasonable Spring experience without it. Also we expect that #21546 will largely improve kotlin-reflect efficiency.

Since KotlinDetector#isKotlinType and KotlinDetector#isSuspendingFunction already have fast and classpath-safe checks of the presence of Kotlin in the classpath, that means there are various KotlinDetector#isKotlinReflectPresent invocations that can be removed from the codebase.

There are also some useless KotlinDetector#isKotlinPresent invocations that we can remove as well.

com.fasterxml.jackson.module.kotlin.KotlinModule requires kotlin-reflect, so the related classpath check in Jackson2ObjectMapperBuilder should be adapted.

Finally, KotlinDetector implementation can be optimized.

@sdeleuze sdeleuze added theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement labels Jan 16, 2025
@sdeleuze sdeleuze added this to the 7.0.0-M1 milestone Jan 16, 2025
@sdeleuze sdeleuze self-assigned this Jan 16, 2025
@sdeleuze sdeleuze changed the title Refine KotlinDetector usages Refine KotlinDetector usages and implementation Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant