This commit is contained in:
Looly 2022-08-06 18:51:28 +08:00
parent 0b14f237f7
commit 5a91443e36
2 changed files with 4 additions and 3 deletions

View File

@ -3,11 +3,12 @@
-------------------------------------------------------------------------------------------------------------
# 5.8.6.M1 (2022-07-30)
# 5.8.6.M1 (2022-08-06)
### 🐣新特性
### 🐞Bug修复
* 【http 】 修复https下可能的Patch、Get请求失效问题issue#I3Z3DH@Gitee
* 【core 】 修复RandomUtil#randomString 入参length为负数时报错问题issue#2515@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -549,11 +549,11 @@ public class RandomUtil {
if (StrUtil.isEmpty(baseString)) {
return StrUtil.EMPTY;
}
final StringBuilder sb = new StringBuilder(length);
if (length < 1) {
length = 1;
}
final StringBuilder sb = new StringBuilder(length);
int baseLength = baseString.length();
for (int i = 0; i < length; i++) {
int number = randomInt(baseLength);