修复RandomUtil.randomInt,RandomUtil.randomLong边界问题

This commit is contained in:
Looly 2023-12-29 00:26:58 +08:00
parent 5feb1114cf
commit bedee44420

View File

@ -249,7 +249,7 @@ public class RandomUtil {
min++;
}
if (includeMax) {
max--;
max++;
}
return getRandom().nextInt(min, max);
}
@ -322,7 +322,7 @@ public class RandomUtil {
min++;
}
if (includeMax) {
max--;
max++;
}
return getRandom().nextLong(min, max);
}