From cc76daf6f1c33daadbca59019a8f223b285fd623 Mon Sep 17 00:00:00 2001 From: godotg Date: Sat, 20 Jul 2024 07:53:20 +0800 Subject: [PATCH] chore[storage]: rename generic type --- .../src/main/java/com/zfoo/storage/convert/ConvertUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 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 85f68f60a..bffb4df50 100644 --- a/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java +++ b/storage/src/main/java/com/zfoo/storage/convert/ConvertUtils.java @@ -73,10 +73,9 @@ public static List convertToList(String content, Class genericType) { return Collections.emptyList(); } var splits = content.split(StringUtils.COMMA_REGEX); - var length = splits.length; var list = new ArrayList(); - for (var i = 0; i < length; i++) { - var value = ConvertUtils.convert(StringUtils.trim(splits[i]), genericType); + for (var split : splits) { + var value = ConvertUtils.convert(StringUtils.trim(split), genericType); list.add(value); } return Collections.unmodifiableList(list);