Skip to content

Commit 609158a

Browse files
committed
Fix warn
1 parent 61bca89 commit 609158a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/kotlin/io/github/projectmapk/jackson/module/kogera/annotationIntrospector/KotlinFallbackAnnotationIntrospector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ internal class KotlinFallbackAnnotationIntrospector(
125125
private fun JmValueParameter.isNullishTypeAt(index: Int): Boolean = arguments.getOrNull(index)?.let {
126126
// If it is not a StarProjection, type is not null
127127
it === KmTypeProjection.STAR || it.type!!.isNullable
128-
} ?: true // If a type argument cannot be taken, treat it as nullable to avoid unexpected failure.
128+
} != false // If a type argument cannot be taken, treat it as nullable to avoid unexpected failure.
129129

130130
private fun JmValueParameter.requireStrictNullCheck(type: JavaType): Boolean =
131131
((type.isArrayType || type.isCollectionLikeType) && !this.isNullishTypeAt(0)) ||

src/main/kotlin/io/github/projectmapk/jackson/module/kogera/annotationIntrospector/KotlinPrimaryAnnotationIntrospector.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ internal class KotlinPrimaryAnnotationIntrospector(
136136
}
137137

138138
private fun Constructor<*>.isPrimarilyConstructorOf(jmClass: JmClass): Boolean = jmClass.findJmConstructor(this)
139-
?.let { !it.isSecondary || jmClass.constructors.size == 1 }
140-
?: false
139+
?.let { !it.isSecondary || jmClass.constructors.size == 1 } == true
141140

142141
private fun isPossibleSingleString(
143142
kotlinParams: List<JmValueParameter>,

0 commit comments

Comments
 (0)