You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a Boolean property without "is" prefix, an exception "Invoked method is not a property accessor" is raised in version 3.3.8 whereas no exception is raised in version 3.2.8.
The test case works in 3.2.8 but fails in 3.3.8 and 3.2.9-12.
@Test
fun testInvokedMethodIsNotAPropertyAccessorSpringBoot329() {
val childId = "childId"
val child = SpringBootTestChildEntity(childId)
val parent = SpringBootTestParentEntity(parentId = "parentId", children = mutableListOf(child))
repo.save(parent)
// act
val result = repo.findByChildrenChildId(childId)
// assert
assert(result.isNotEmpty())
result.forEach {
val children = it.children
children.childId // This fails with IllegalStateException for Spring Boot 3.2.9 but works in 3.3.8
children.isChild
children.fromOuterSpace // This fails in Spring Boot 3.3.8 (because of missing "is" prefix) but works in 3.2.8
}
}
The text was updated successfully, but these errors were encountered:
mp911de
transferred this issue from spring-projects/spring-data-jpa
Feb 20, 2025
mp911de
changed the title
Switching from 3.2.8 to 3.3.8 causes exception for Bean property with "is" prefixKotlinBeanInfoFactory doesn't consider get-prefixed methods as getters for boolean properties
Feb 20, 2025
That's fixed now and snapshots will be deployed into repo.spring.io in a few moments. Care to upgrade to the 3.3.10-SNAPSHOT and verify whether the fix is working for you?
This is a follow-up to spring-projects/spring-data-jpa#3771
When using a Boolean property without "is" prefix, an exception "Invoked method is not a property accessor" is raised in version 3.3.8 whereas no exception is raised in version 3.2.8.
Kindly check out the extended test case showing two Boolean variants: https://github.com/mmrsic/spring-boot-data-329-issue/blob/main/src/test/kotlin/org/springboot/issues/springbootdata329issue/ApplicationTests.kt
The test case works in 3.2.8 but fails in 3.3.8 and 3.2.9-12.
The text was updated successfully, but these errors were encountered: