Mercurial > hg > truffle
diff graal/com.oracle.max.base/src/com/sun/max/Utils.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/Utils.java Sun Dec 18 05:23:52 2011 +0100 +++ b/graal/com.oracle.max.base/src/com/sun/max/Utils.java Sun Dec 18 05:24:06 2011 +0100 @@ -164,7 +164,7 @@ * */ @SuppressWarnings("unchecked") - public static <T> T cast(Class<T> type, Object object) { + public static <T> T cast(@SuppressWarnings("unused") Class<T> type, Object object) { return (T) object; } @@ -184,6 +184,7 @@ * @param tail the elements to be concatenated to {@code head} * @return the result of concatenating {@code tail} to the end of {@code head} */ + @SafeVarargs public static <T> T[] concat(T[] head, T... tail) { T[] result = Arrays.copyOf(head, head.length + tail.length); System.arraycopy(tail, 0, result, head.length, tail.length); @@ -198,6 +199,7 @@ * @param head the prefix of the result array * @return the result of concatenating {@code tail} to the end of {@code head} */ + @SafeVarargs public static <T> T[] prepend(T[] tail, T... head) { return concat(head, tail); }