diff --git a/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java b/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java index f82763155..16b767df5 100755 --- a/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java @@ -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); }