Address unchecked warnings in o/e/c/c/Cache.java

This commit is contained in:
Jason Tedor 2016-01-02 18:38:40 -05:00
parent 61b7014023
commit 265f8f8512
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}
}