Skip to content

Commit

Permalink
Merge pull request #776 from k163377/improve-perf
Browse files Browse the repository at this point in the history
Delete Duration conversion that was no longer needed
  • Loading branch information
k163377 authored Mar 15, 2024
2 parents 6e1ea65 + 79b6201 commit 32730dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
7 changes: 6 additions & 1 deletion release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 32730dc

Please sign in to comment.