fix RandomUtil.randomInt,RandomUtil.randomLong range problem #3449

This commit is contained in:
holmebin 2023-12-28 23:07:44 +08:00
parent 6f9279a313
commit c7e2720cc5

View File

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