@@ -404,12 +404,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
return "";
}
- List<String> pool;
- if (chars == null || chars.isEmpty()) {
- pool = DEFAULT_CHARS;
- } else {
- pool = chars;
- }
+ List<String> pool = chars == null || chars.isEmpty() ? DEFAULT_CHARS : chars;
if (pool.isEmpty()) {
throw new IllegalArgumentException("字符集不能为空");