Skip to content

Commit 57158ec

Browse files
committed
Fix function name
1 parent 10633d7 commit 57158ec

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
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
@@ -37,7 +37,7 @@ internal class KotlinFallbackAnnotationIntrospector(
3737
) : NopAnnotationIntrospector() {
3838
private fun findKotlinParameter(param: AnnotatedParameter): KmValueParameter? =
3939
when (val owner = param.owner.member) {
40-
is Constructor<*> -> cache.getJmClass(param.declaringClass)?.findKmConstructor(owner)?.valueParameters
40+
is Constructor<*> -> cache.getJmClass(param.declaringClass)?.findJmConstructor(owner)?.valueParameters
4141
is Method -> if (Modifier.isStatic(owner.modifiers)) {
4242
cache.getJmClass(param.declaringClass)
4343
?.companion

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ internal class KotlinPrimaryAnnotationIntrospector(
8989

9090
private fun AnnotatedParameter.hasRequiredMarker(jmClass: JmClass): Boolean? {
9191
val paramDef = when (val member = member) {
92-
is Constructor<*> -> jmClass.findKmConstructor(member)?.valueParameters
92+
is Constructor<*> -> jmClass.findJmConstructor(member)?.valueParameters
9393
is Method -> jmClass.companion?.findFunctionByMethod(member)?.valueParameters
9494
else -> null
9595
}?.let { it[index] } ?: return null // Return null if function on Kotlin cannot be determined
@@ -137,7 +137,7 @@ internal class KotlinPrimaryAnnotationIntrospector(
137137
}
138138
}
139139

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

src/main/kotlin/io/github/projectmapk/jackson/module/kogera/deser/valueInstantiator/creator/ConstructorValueCreator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal class ConstructorValueCreator<T : Any>(
2626
// To prevent the call from failing, save the initial value and then rewrite the flag.
2727
if (!isAccessible) constructor.isAccessible = true
2828

29-
val constructorParameters = declaringJmClass.findKmConstructor(constructor)!!.valueParameters
29+
val constructorParameters = declaringJmClass.findJmConstructor(constructor)!!.valueParameters
3030

3131
valueParameters = constructorParameters.map { ValueParameter(it) }
3232
val rawTypes = constructor.parameterTypes.asList()

src/main/kotlin/io/github/projectmapk/jackson/module/kogera/jmClass/JmClass.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal sealed interface JmClass {
5353
val wrapsNullableIfValue: Boolean
5454
// endregion
5555

56-
fun findKmConstructor(constructor: Constructor<*>): JmConstructor?
56+
fun findJmConstructor(constructor: Constructor<*>): JmConstructor?
5757
fun findPropertyByField(field: Field): JmProperty?
5858
fun findPropertyByGetter(getter: Method): JmProperty?
5959
}
@@ -103,7 +103,7 @@ private class JmClassImpl(
103103
companionPropName?.let { JmClass.CompanionObject(clazz, it) }
104104
}
105105

106-
override fun findKmConstructor(constructor: Constructor<*>): JmConstructor? {
106+
override fun findJmConstructor(constructor: Constructor<*>): JmConstructor? {
107107
val descHead = constructor.parameterTypes.toDescBuilder()
108108
val len = descHead.length
109109
val desc = CharArray(len + 1).apply {

0 commit comments

Comments
 (0)