mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
@yujr
@0001 @修改方法名不合理,HashMap未设置初始化大小值
This commit is contained in:
parent
630ed4775f
commit
84664a9a69
@ -299,7 +299,8 @@ public class BackgroundRemoval {
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Integer> map = new HashMap<>(list.size());
|
||||
int initialCapacity = (int) ((float) list.size() / 0.75F + 1.0F);
|
||||
Map<String, Integer> map = new HashMap<>(initialCapacity);
|
||||
for (String string : list) {
|
||||
Integer integer = map.get(string);
|
||||
if (integer == null) {
|
||||
@ -351,4 +352,4 @@ public class BackgroundRemoval {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class NetUtil {
|
||||
* @return 大整数, 如发生异常返回 null
|
||||
* @since 5.5.7
|
||||
*/
|
||||
public static BigInteger ipv6ToBitInteger(String IPv6Str) {
|
||||
public static BigInteger ipv6ToBigInteger(String IPv6Str) {
|
||||
try {
|
||||
InetAddress address = InetAddress.getByName(IPv6Str);
|
||||
if (address instanceof Inet6Address) {
|
||||
|
Loading…
Reference in New Issue
Block a user