Regression in handling of overloaded setters / properties between Spring 5.x and 6.x #34037
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: invalid
An issue that we don't feel is valid
This configuration works successfully in Spring 5.x, but fails with Spring 6.x with the following error:
The complexity comes from the fact that
org.asynchttpclient.proxy.ProxyServer.Builder#setRealm
is overloaded, and there are two versions—one acceptingRealm
and another acceptingRealm$Builder
.The following code in
BeanWrapperImpl
seems like it's not considering there may be several property descriptors for the same name:https://github.com/spring-projects/spring-framework/blob/2e57603/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java#L184
What makes the matter worse, looks like the behavior is not deterministic. In different environments Spring will try to use different setters.
The text was updated successfully, but these errors were encountered: