fix 长度问题

This commit is contained in:
cheney
2026-05-29 16:44:04 +08:00
parent 914ba8eee5
commit d1c8201f98
2 changed files with 132 additions and 5 deletions
@@ -91,7 +91,7 @@ public final class ParamChecker {
* @throws IllegalArgumentException 如果 str 为 null 或仅包含空白字符
*/
public static String checkNotBlank(String str, String paramName) {
if (str == null || str.isBlank()) {
if (str == null || !str.trim().isEmpty()) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null、空字符串或仅包含空白字符");
}
return str;