Closed as not planned
Closed as not planned
Description
Affects: 6.1.5
Value classes in Kotlin with private constructor hits the following exception:
java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$Method cannot access a member of class org.gajyoung.demosbwithvalueclass.FooId with modifiers "private static"
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:560) ~[na:an]
I've reproduced the issue in a WebMVC where the value class is a required request header: https://github.com/k3vonk/springboot-3.2.4-with-value-class
This issue does not occur in Spring Boot 3.2.3 which uses spring framework 6.1.4. You can switch the versions in the above example, and the get request will pass without an exception.