Rely on standard parameter name resolution in Bean Validation 3.0 #29566
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Following up on #29531 and #29563, it turns out that Hibernate Validator is aggressively introspection parameter names for every constructor/method parameter that it discovers, even if those parameters are standard JDK types. This not only leads to many warn log entries, it also indicates that we are parsing JDK class files to find out about parameter names which are effectively not needed (since Hibernate Validator does not actually need them for those parameter types).
Additionally, Bean Validation 3.0 / Hibernate Validator 7.0 (which is the minimum requirement as of Spring Framework 6.0) has built-in parameter name resolution based on standard Java 8 reflection itself, including a fallback to the generated
arg
names there. As a consequence, we do not need to repeat Java 8 reflection on top but may rather just override it with Kotlin reflection, and never fall back to ASM-based class file parsing for debug symbols.The text was updated successfully, but these errors were encountered: