Skip to content

Commit e017f64

Browse files
committed
modify
1 parent 2780abd commit e017f64

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinNamesAnnotationIntrospector.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,6 @@ private fun KFunction<*>.isPossibleSingleString(propertyNames: Set<String>): Boo
151151
private fun Collection<KFunction<*>>.filterOutSingleStringCallables(propertyNames: Set<String>): Collection<KFunction<*>> =
152152
this.filter { !it.isPossibleSingleString(propertyNames) }
153153

154-
private fun KClass<*>.isPrimaryConstructor(kConstructor: KFunction<*>) = this.primaryConstructor == kConstructor ||
155-
(this.primaryConstructor == null && this.constructors.size == 1)
154+
private fun KClass<*>.isPrimaryConstructor(kConstructor: KFunction<*>) = this.primaryConstructor.let {
155+
it == kConstructor || (it == null && this.constructors.size == 1)
156+
}

0 commit comments

Comments
 (0)