mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -336,7 +336,7 @@ public class MethodUtil {
|
|||||||
public static Method[] getDeclaredMethods(final Class<?> beanClass) throws SecurityException {
|
public static Method[] getDeclaredMethods(final Class<?> beanClass) throws SecurityException {
|
||||||
Assert.notNull(beanClass);
|
Assert.notNull(beanClass);
|
||||||
return DECLARED_METHODS_CACHE.computeIfAbsent(beanClass,
|
return DECLARED_METHODS_CACHE.computeIfAbsent(beanClass,
|
||||||
key -> getMethodsDirectly(beanClass, false, Objects.equals(Object.class, beanClass)));
|
key -> getMethodsDirectly(beanClass, false, Objects.equals(Object.class, beanClass)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -781,7 +781,7 @@ public class MethodUtil {
|
|||||||
actualArgs[i] = null;
|
actualArgs[i] = null;
|
||||||
} else if (false == parameterTypes[i].isAssignableFrom(args[i].getClass())) {
|
} else if (false == parameterTypes[i].isAssignableFrom(args[i].getClass())) {
|
||||||
//对于类型不同的字段,尝试转换,转换失败则使用原对象类型
|
//对于类型不同的字段,尝试转换,转换失败则使用原对象类型
|
||||||
final Object targetValue = Convert.convert(parameterTypes[i], args[i]);
|
final Object targetValue = Convert.convertQuietly(parameterTypes[i], args[i], args[i]);
|
||||||
if (null != targetValue) {
|
if (null != targetValue) {
|
||||||
actualArgs[i] = targetValue;
|
actualArgs[i] = targetValue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user