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

Print this page

        

@@ -242,11 +242,11 @@
      * 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")
+    @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,10 +263,11 @@
         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);