mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
bugfix: implicit conversion loses integer precision.
This commit is contained in:
parent
dbc744bfae
commit
0cb435943b
@ -33,7 +33,7 @@ public class LongMap implements BitMap, Serializable {
|
||||
public void add(long i) {
|
||||
int r = (int) (i / BitMap.MACHINE64);
|
||||
long c = i % BitMap.MACHINE64;
|
||||
longs[r] = longs[r] | (1 << c);
|
||||
longs[r] = longs[r] | (1L << c);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -47,7 +47,7 @@ public class LongMap implements BitMap, Serializable {
|
||||
public void remove(long i) {
|
||||
int r = (int) (i / BitMap.MACHINE64);
|
||||
long c = i % BitMap.MACHINE64;
|
||||
longs[r] &= ~(1 << c);
|
||||
longs[r] &= ~(1L << c);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user