mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
change name
This commit is contained in:
parent
d69b95f066
commit
5465293603
@ -25,6 +25,7 @@
|
||||
* 【core 】 ImgUtil增加getImage方法(issue#I2DU1Z@Gitee)
|
||||
* 【core 】 DateUtil.beginOfHour(pr#269@Gitee)
|
||||
* 【core 】 MapUtil增加sortByValue(pr#259@Gitee)
|
||||
* 【core 】 TypeUtil修正hasTypeVeriable为hasTypeVariable
|
||||
|
||||
### Bug修复
|
||||
* 【core 】 修复FileUtil.move以及PathUtil.copy等无法自动创建父目录的问题(issue#I2CKTI@Gitee)
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user