From 552ebac67a7f969f7827940c0e17a6247385d76f Mon Sep 17 00:00:00 2001 From: godotg Date: Sat, 20 Jul 2024 07:52:28 +0800 Subject: [PATCH] chore[storage]: rename generic type --- .../main/java/com/zfoo/storage/convert/ConvertUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java b/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java index 080e65e30..85f68f60a 100644 --- a/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java +++ b/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java @@ -67,7 +67,7 @@ public static Object convertToArray(String content, Class componentType) { return array; } - public static List convertToList(String content, Class type) { + public static List convertToList(String content, Class genericType) { content = StringUtils.trim(content); if (StringUtils.isEmpty(content)) { return Collections.emptyList(); @@ -76,17 +76,17 @@ public static List convertToList(String content, Class type) { var length = splits.length; var list = new ArrayList(); for (var i = 0; i < length; i++) { - var value = ConvertUtils.convert(StringUtils.trim(splits[i]), type); + var value = ConvertUtils.convert(StringUtils.trim(splits[i]), genericType); list.add(value); } return Collections.unmodifiableList(list); } - public static Set convertToSet(String content, Class type) { + public static Set convertToSet(String content, Class genericType) { content = StringUtils.trim(content); if (StringUtils.isEmpty(content)) { return Collections.emptySet(); } - return Set.copyOf(convertToList(content, type)); + return Set.copyOf(convertToList(content, genericType)); } }