fix 长度问题
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user