Skip to content

Commit 9622a71

Browse files
committed
Merge remote-tracking branch 'FasterXML/2.18'
2 parents f4c3856 + 53d75aa commit 9622a71

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@
165165
<goals>
166166
<goal>test-compile</goal>
167167
</goals>
168+
<configuration>
169+
<args>
170+
</args>
171+
</configuration>
168172
</execution>
169173
</executions>
170174
</plugin>

release-notes/CREDITS-2.x

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Contributors:
1717

1818
# 2.18.0 (not yet released)
1919
* #782: Organize deprecated contents
20+
* #542: Remove meaningless checks and properties in KNAI
2021

2122
# 2.17.2 (not yet released)
2223

release-notes/VERSION-2.x

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Co-maintainers:
2323
#782: Content marked as deprecated has been reorganized.
2424
Several constructors and accessors to properties of KotlinModule.Builder that were marked as DeprecationLevel.ERROR have been removed.
2525
Also, the content marked as DeprecationLevel.WARNING is now DeprecationLevel.ERROR.
26+
#542: Remove meaningless checks and properties in KNAI.
2627

2728
2.17.2 (not yet released)
2829
#799: Fixed problem with code compiled with 2.17.x losing backward compatibility.

src/main/kotlin/tools/jackson/module/kotlin/KotlinModule.kt

+1-8
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ class KotlinModule private constructor(
8484
builder.isEnabled(UseJavaDurationConversion),
8585
)
8686

87-
private val ignoredClassesForImplyingJsonCreator = emptySet<KClass<*>>()
88-
8987
override fun setupModule(context: SetupContext) {
9088
super.setupModule(context)
9189

@@ -110,12 +108,7 @@ class KotlinModule private constructor(
110108
nullIsSameAsDefault,
111109
useJavaDurationConversion
112110
))
113-
context.appendAnnotationIntrospector(
114-
KotlinNamesAnnotationIntrospector(
115-
cache,
116-
ignoredClassesForImplyingJsonCreator,
117-
kotlinPropertyNameAsImplicitName)
118-
)
111+
context.appendAnnotationIntrospector(KotlinNamesAnnotationIntrospector(cache, kotlinPropertyNameAsImplicitName))
119112

120113
context.addDeserializers(KotlinDeserializers(cache, useJavaDurationConversion))
121114
context.addKeyDeserializers(KotlinKeyDeserializers)

src/main/kotlin/tools/jackson/module/kotlin/KotlinNamesAnnotationIntrospector.kt

-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import kotlin.reflect.jvm.javaType
2323

2424
internal class KotlinNamesAnnotationIntrospector(
2525
private val cache: ReflectionCache,
26-
private val ignoredClassesForImplyingJsonCreator: Set<KClass<*>>,
2726
private val useKotlinPropertyNameForGetter: Boolean
2827
) : NopAnnotationIntrospector() {
2928
private fun getterNameFromJava(member: AnnotatedMethod): String? {
@@ -89,7 +88,6 @@ internal class KotlinNamesAnnotationIntrospector(
8988
// don't add a JsonCreator to any constructor if one is declared already
9089

9190
val kClass = member.declaringClass.kotlin
92-
.apply { if (this in ignoredClassesForImplyingJsonCreator) return false }
9391
val kConstructor = cache.kotlinFromJava(member.annotated) ?: return false
9492

9593
// TODO: should we do this check or not? It could cause failures if we miss another way a property could be set

0 commit comments

Comments
 (0)