-
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Labels
Description
Describe the bug
The result in serialization of a function returning a boolean is changed from version 2.14.2 and 2.15.0.
To Reproduce
2.14.2
interface TestInterface{
fun isValid(): Boolean
}
class TestClass: TestInterface{
override fun isValid(): Boolean {
return true
}
}
@Test
fun `serialize`(){
val test = TestClass()
val actual = jacksonObjectMapper().writeValueAsString(test)
assertThat(actual).isEqualTo("{\"valid\":true}")
}
2.15.0
interface TestInterface{
fun isValid(): Boolean
}
class TestClass: TestInterface{
override fun isValid(): Boolean {
return true
}
}
@Test
fun `serialize`(){
val test = TestClass()
val actual = jacksonObjectMapper().writeValueAsString(test)
assertThat(actual).isEqualTo("{\"isValid\":true}")
}
Expected behavior
The serialization of functions does not change.
Versions
Kotlin: 1.8.20
Jackson-module-kotlin: 2.15.2
Jackson-databind: SpringBoot: 3.0.6 (brings jackson-databind 2.14.2)
Additional context
Add any other context about the problem here.