mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 08:19:01 +00:00
Fixed primitive type assignability in BeanUtils.copyProperties
Issue: SPR-11231
This commit is contained in:
@@ -600,7 +600,7 @@ public abstract class BeanUtils {
|
||||
if (sourcePd != null) {
|
||||
Method readMethod = sourcePd.getReadMethod();
|
||||
if (readMethod != null &&
|
||||
writeMethod.getParameterTypes()[0].isAssignableFrom(readMethod.getReturnType())) {
|
||||
ClassUtils.isAssignable(writeMethod.getParameterTypes()[0], readMethod.getReturnType())) {
|
||||
try {
|
||||
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers())) {
|
||||
readMethod.setAccessible(true);
|
||||
|
||||
Reference in New Issue
Block a user