Address unchecked warnings in o/e/c/c/Cache.java
This commit is contained in:
parent
61b7014023
commit
265f8f8512
|
@ -296,7 +296,7 @@ public class Cache<K, V> {
|
|||
}
|
||||
|
||||
public static final int NUMBER_OF_SEGMENTS = 256;
|
||||
private final CacheSegment<K, V>[] segments = new CacheSegment[NUMBER_OF_SEGMENTS];
|
||||
@SuppressWarnings("unchecked") private final CacheSegment<K, V>[] segments = new CacheSegment[NUMBER_OF_SEGMENTS];
|
||||
|
||||
{
|
||||
for (int i = 0; i < segments.length; i++) {
|
||||
|
@ -432,7 +432,7 @@ public class Cache<K, V> {
|
|||
promote(tuple.v1(), now);
|
||||
}
|
||||
if (replaced) {
|
||||
removalListener.onRemoval(new RemovalNotification(tuple.v2().key, tuple.v2().value, RemovalNotification.RemovalReason.REPLACED));
|
||||
removalListener.onRemoval(new RemovalNotification<>(tuple.v2().key, tuple.v2().value, RemovalNotification.RemovalReason.REPLACED));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue