change name

This commit is contained in:
Looly 2021-01-31 21:38:54 +08:00
parent d69b95f066
commit 5465293603
2 changed files with 15 additions and 1 deletions

View File

@ -25,6 +25,7 @@
* 【core 】 ImgUtil增加getImage方法issue#I2DU1Z@Gitee
* 【core 】 DateUtil.beginOfHourpr#269@Gitee
* 【core 】 MapUtil增加sortByValuepr#259@Gitee
* 【core 】 TypeUtil修正hasTypeVeriable为hasTypeVariable
### Bug修复
* 【core 】 修复FileUtil.move以及PathUtil.copy等无法自动创建父目录的问题issue#I2CKTI@Gitee

View File

@ -301,8 +301,21 @@ public class TypeUtil {
* @param types 泛型数组
* @return 是否含有泛型变量
* @since 4.5.7
* @deprecated 拼写错误请使用{@link #hasTypeVariable(Type...)}
*/
@Deprecated
public static boolean hasTypeVeriable(Type... types) {
return hasTypeVariable(types);
}
/**
* 指定泛型数组中是否含有泛型变量
*
* @param types 泛型数组
* @return 是否含有泛型变量
* @since 4.5.7
*/
public static boolean hasTypeVariable(Type... types) {
for (Type type : types) {
if (type instanceof TypeVariable) {
return true;
@ -379,7 +392,7 @@ public class TypeUtil {
Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
// 泛型对象中含有未被转换的泛型变量
if (TypeUtil.hasTypeVeriable(actualTypeArguments)) {
if (TypeUtil.hasTypeVariable(actualTypeArguments)) {
actualTypeArguments = getActualTypes(type, parameterizedType.getActualTypeArguments());
if (ArrayUtil.isNotEmpty(actualTypeArguments)) {
// 替换泛型变量为实际类型例如List<T>变为List<String>