diff graal/com.oracle.max.base/src/com/sun/max/collect/PoolSet.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children
line wrap: on
line diff
--- a/graal/com.oracle.max.base/src/com/sun/max/collect/PoolSet.java	Sun Dec 18 05:23:52 2011 +0100
+++ b/graal/com.oracle.max.base/src/com/sun/max/collect/PoolSet.java	Sun Dec 18 05:24:06 2011 +0100
@@ -149,12 +149,12 @@
      */
     public static <T extends PoolObject> PoolSet<T> noneOf(Pool<T> pool) {
         if (pool.length() <= PoolSet64.MAX_POOL_SIZE) {
-            return new PoolSet64<T>(pool);
+            return new PoolSet64<>(pool);
         }
         if (pool.length() <= PoolSet128.MAX_POOL_SIZE) {
-            return new PoolSet128<T>(pool);
+            return new PoolSet128<>(pool);
         }
-        return new PoolBitSet<T>(pool);
+        return new PoolBitSet<>(pool);
     }
 
     /**
@@ -178,6 +178,7 @@
      * @param rest zero or more objects that will be in the returned set
      * @return a pool set containing {@code first} and all the objects in {@code rest}
      */
+    @SafeVarargs
     public static <T extends PoolObject, S extends T> PoolSet<T> of(Pool<T> pool, S first, S... rest) {
         final PoolSet<T> poolSet = noneOf(pool);
         poolSet.add(first);