mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
调整锁位置和 不必要的int拆箱
This commit is contained in:
@@ -144,8 +144,8 @@ public abstract class ReentrantCache<K, V> extends AbstractCache<K, V> {
|
||||
* @param withMissCount 是否计数丢失数
|
||||
*/
|
||||
private void remove(final K key, final boolean withMissCount) {
|
||||
lock.lock();
|
||||
CacheObj<K, V> co;
|
||||
lock.lock();
|
||||
try {
|
||||
co = removeWithoutLock(key, withMissCount);
|
||||
} finally {
|
||||
|
@@ -365,7 +365,7 @@ public class Ipv4Util implements Ipv4Pool {
|
||||
* @return 掩码位,例如 24
|
||||
* @throws IllegalArgumentException 子网掩码非法
|
||||
*/
|
||||
public static int getMaskBitByMask(final String mask) {
|
||||
public static Integer getMaskBitByMask(final String mask) {
|
||||
final Integer maskBit = MaskBit.getMaskBit(mask);
|
||||
Assert.notNull(maskBit, "Invalid netmask:{}", mask);
|
||||
return maskBit;
|
||||
|
Reference in New Issue
Block a user