New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify behavior for generics support in BeanUtils.copyProperties #27259
Comments
This is a potential regression introduced in conjunction with #24187. @afattahi54, can you please also provide the setter and getter methods of those two classes so that we can inspect the actual method signatures? Also, if Doing so would actually store items in the |
The The setters and getters are as below: public class transferVO {
private List<Signer> signers;
public List<Signer> getSigners() {
return signers;
}
public void setSigners(List<Signer> signers) {
this.signers = signers;
}
}
public class transferRequest {
private List<TransferSigners > signers;
public List<TransferSigners> getSigners() {
return signers;
}
public void setSigners(List<TransferSigners> signers) {
this.signers = signers;
}
} Thanks |
@sbrannen spring-beans version is 5.3.9, when Signer is a subtype of TransferSigners,use the BeanUtils.copyProperties(transferVO , transferRequest). the transferVO.signers is null. but when spring-beans version is 5.1.16.RELEASE is normal. I hope the new version is compatible with the previous version. |
Assigned to the Triage Queue so that the team can determine if this is a regression that needs to be fixed. |
@afattahi54, since
@bigdata-page, that can be addressed by using an upper-bounded wildcard for the target property type. In commit 887389d, I added a table to the Javadoc for |
The below code works in
5.2.9.RELEASE
The classes where as follow. As you can see the source and destination beans has a List with same name but different types. But it was working
After upgrade to
5.3.7
thesigners
property is not copied.The text was updated successfully, but these errors were encountered: