I add th code in TypeUtils and TypeUtilsTest.
In isAssignable method, the case when parameter is TypeVariable is added.
This is reported in Jira SPR-9719: TypeUtils.isAssignable does not recognize TypeVariable types
After checking if lhsType is instanceof Class<?>, rhsType will be check TypeVariable.
else if(rhsType instanceof TypeVariable) { Type[] types = ((TypeVariable<?>)rhsType).getBounds();
for(int i=0; i<types.length; i++) {
if(isAssignable(lhsClass, types[i])) return true;
}
}
Please consider this.
I hope that I can contribute. Thanks.
Comment From: philwebb
Hi @youngjee,
Thanks for the contribution. Have you signed the contributors license agreement yet? It is pretty straight forward and shouldn't take long.
https://github.com/SpringSource/spring-framework/blob/master/CONTRIBUTING.md
Comment From: youngjee
Thanks.
I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.
Comment From: vyncentk
Hi @youngjee , would you mind get a look into clonflicts and codacy ? Thanks
Comment From: pivotal-issuemaster
@youngjee Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.