Fix implicit cast warnings seen.
This commit is contained in:
@@ -38,7 +38,7 @@ public class ArrayMask
|
||||
*/
|
||||
public void set (int index)
|
||||
{
|
||||
_mask[index/8] |= (1 << (index%8));
|
||||
_mask[index/8] |= (byte)(1 << (index%8));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -373,7 +373,7 @@ public class PresentsSession
|
||||
// because we won't be closing their socket normally
|
||||
if (getConnection() != null) {
|
||||
long now = System.currentTimeMillis();
|
||||
_connectTime += ((now - _networkStamp) / 1000);
|
||||
_connectTime += (int)((now - _networkStamp) / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,7 +834,7 @@ public class PresentsSession
|
||||
// if our connection is being cleared out, record the amount of time we were connected
|
||||
// to our total connected time
|
||||
if (conn == null) {
|
||||
_connectTime += ((now - _networkStamp) / 1000);
|
||||
_connectTime += (int)((now - _networkStamp) / 1000);
|
||||
_messagesDropped = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public class StreamableEnumSet<E extends Enum<E>> extends AbstractSet<E>
|
||||
}
|
||||
public void remove () {
|
||||
checkConcurrentModification();
|
||||
_contents[_idx] &= ~(1 << _bit);
|
||||
_contents[_idx] &= (byte)~(1 << _bit);
|
||||
_size--;
|
||||
_count--;
|
||||
_omodcount = ++_modcount;
|
||||
@@ -184,7 +184,7 @@ public class StreamableEnumSet<E extends Enum<E>> extends AbstractSet<E>
|
||||
int ordinal = _elementType.cast(o).ordinal();
|
||||
int idx = ordinal >> 3, mask = 1 << (ordinal & 0x07);
|
||||
if ((_contents[idx] & mask) == 0) {
|
||||
_contents[idx] |= mask;
|
||||
_contents[idx] |= (byte)mask;
|
||||
_size++;
|
||||
_modcount++;
|
||||
return true;
|
||||
@@ -201,7 +201,7 @@ public class StreamableEnumSet<E extends Enum<E>> extends AbstractSet<E>
|
||||
int ordinal = ((Enum<?>)o).ordinal();
|
||||
int idx = ordinal >> 3, mask = 1 << (ordinal & 0x07);
|
||||
if ((_contents[idx] & mask) != 0) {
|
||||
_contents[idx] &= ~mask;
|
||||
_contents[idx] &= (byte)~mask;
|
||||
_size--;
|
||||
_modcount++;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user