mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
修复AbstractFilter没有检查参数长度问题(issue#3854@Github)
This commit is contained in:
parent
13c6f35826
commit
d8ff04ede2
@ -2,7 +2,7 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.36(2025-01-24)
|
# 5.8.36(2025-01-27)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【crypto 】 增加BCUtil.decodeECPrivateKey方法(issue#3829@Github)
|
* 【crypto 】 增加BCUtil.decodeECPrivateKey方法(issue#3829@Github)
|
||||||
@ -15,6 +15,7 @@
|
|||||||
* 【aop 】 修复ProxyUtil可能的空指针问题(issue#IBF20Z@Gitee)
|
* 【aop 】 修复ProxyUtil可能的空指针问题(issue#IBF20Z@Gitee)
|
||||||
* 【core 】 修复XmlUtil转义调用方法错误问题,修复XmlEscape未转义单引号问题(pr#3837@Github)
|
* 【core 】 修复XmlUtil转义调用方法错误问题,修复XmlEscape未转义单引号问题(pr#3837@Github)
|
||||||
* 【core 】 修复FileUtil.isAbsolutePath没有判断smb路径问题(pr#1299@Gitee)
|
* 【core 】 修复FileUtil.isAbsolutePath没有判断smb路径问题(pr#1299@Gitee)
|
||||||
|
* 【core 】 修复AbstractFilter没有检查参数长度问题(issue#3854@Github)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.35(2024-12-25)
|
# 5.8.35(2024-12-25)
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.bloomfilter.BloomFilter;
|
|||||||
import cn.hutool.bloomfilter.bitMap.BitMap;
|
import cn.hutool.bloomfilter.bitMap.BitMap;
|
||||||
import cn.hutool.bloomfilter.bitMap.IntMap;
|
import cn.hutool.bloomfilter.bitMap.IntMap;
|
||||||
import cn.hutool.bloomfilter.bitMap.LongMap;
|
import cn.hutool.bloomfilter.bitMap.LongMap;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽象Bloom过滤器
|
* 抽象Bloom过滤器
|
||||||
@ -46,7 +47,7 @@ public abstract class AbstractFilter implements BloomFilter {
|
|||||||
* @param machineNum 机器位数
|
* @param machineNum 机器位数
|
||||||
*/
|
*/
|
||||||
public void init(long maxValue, int machineNum) {
|
public void init(long maxValue, int machineNum) {
|
||||||
this.size = maxValue;
|
this.size = Assert.checkBetween(maxValue, 1, Integer.MAX_VALUE);
|
||||||
switch (machineNum) {
|
switch (machineNum) {
|
||||||
case BitMap.MACHINE32:
|
case BitMap.MACHINE32:
|
||||||
bm = new IntMap((int) (size / machineNum));
|
bm = new IntMap((int) (size / machineNum));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user