mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-09 15:17:59 +08:00
fix bug
This commit is contained in:
parent
0b14f237f7
commit
5a91443e36
@ -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)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user