Skip to content

Delete Duration conversion that was no longer needed #776

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

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
@@ -15,7 +15,12 @@ Authors:

Contributors:

# 2.17.0 (not yet released)
# 2.17.1 (not yet released)

WrongWrong (@k163377)
* #776: Delete Duration conversion that was no longer needed

# 2.17.0

WrongWrong (@k163377)
* #768: Added value class deserialization support.
4 changes: 4 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
@@ -16,6 +16,10 @@ Co-maintainers:
=== Releases ===
------------------------------------------------------------------------

2.17.1 (not yet released)

#776: Delete Duration conversion that was no longer needed.

2.17.0 (12-Mar-2024)

#768: Added value class deserialization support.
Original file line number Diff line number Diff line change
@@ -86,20 +86,6 @@ internal class KotlinAnnotationIntrospector(
?.takeIf { it.wrapsNullable() }
?.let { cache.getValueClassBoxConverter(am.rawReturnType, it).delegatingSerializer }

override fun findDeserializationConverter(a: Annotated): Any? {
if (!useJavaDurationConversion) return null

return (a as? AnnotatedParameter)?.let { param ->
val valueParameter = cache.findKotlinParameter(param) ?: return@let null

if (valueParameter.type.classifier == Duration::class) {
JavaToKotlinDurationConverter
} else {
null
}
}
}

/**
* Subclasses can be detected automatically for sealed classes, since all possible subclasses are known
* at compile-time to Kotlin. This makes [com.fasterxml.jackson.annotation.JsonSubTypes] redundant.