src/share/classes/com/sun/beans/util/Cache.java

Print this page

        

*** 242,252 **** * Creates a new array for the cache entries. * * @param size requested capacity MUST be a power of two * @return a new array for the cache entries */ ! @SuppressWarnings("unchecked") private CacheEntry<K,V>[] newTable(int size) { return (CacheEntry<K,V>[]) new CacheEntry[size]; } private V getEntryValue(K key, int hash, CacheEntry<K,V> entry) { --- 242,252 ---- * Creates a new array for the cache entries. * * @param size requested capacity MUST be a power of two * @return a new array for the cache entries */ ! @SuppressWarnings({"unchecked", "rawtypes"}) private CacheEntry<K,V>[] newTable(int size) { return (CacheEntry<K,V>[]) new CacheEntry[size]; } private V getEntryValue(K key, int hash, CacheEntry<K,V> entry) {
*** 263,272 **** --- 263,273 ---- Object reference = this.queue.poll(); if (reference != null) { synchronized (this.queue) { do { if (reference instanceof Ref) { + @SuppressWarnings("rawtypes") Ref ref = (Ref) reference; @SuppressWarnings("unchecked") CacheEntry<K,V> owner = (CacheEntry<K,V>) ref.getOwner(); if (owner != null) { int index = index(owner.hash, this.table);