mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix RandomUtil.randomInt,RandomUtil.randomLong range problem #3449
This commit is contained in:
parent
6f9279a313
commit
c7e2720cc5
@ -223,7 +223,7 @@ public class RandomUtil {
|
|||||||
min++;
|
min++;
|
||||||
}
|
}
|
||||||
if (includeMax) {
|
if (includeMax) {
|
||||||
max--;
|
max++;
|
||||||
}
|
}
|
||||||
return getRandom().nextInt(min, max);
|
return getRandom().nextInt(min, max);
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ public class RandomUtil {
|
|||||||
min++;
|
min++;
|
||||||
}
|
}
|
||||||
if (includeMax) {
|
if (includeMax) {
|
||||||
max--;
|
max++;
|
||||||
}
|
}
|
||||||
return getRandom().nextLong(min, max);
|
return getRandom().nextLong(min, max);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user