# HG changeset patch # User Thomas Wuerthinger # Date 1373234730 -7200 # Node ID b6e46324233f3f64682b91ae024607fdccddd149 # Parent ac8b195fd3aa449d4f94d462d9fde5d13051d93c Make CompilerDirectives.unsafeCast a generic method. diff -r ac8b195fd3aa -r b6e46324233f graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Sun Jul 07 23:51:52 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Mon Jul 08 00:05:30 2013 +0200 @@ -134,8 +134,9 @@ * @param clazz the specified type of the value * @return the value */ + @SuppressWarnings("unchecked") @Unsafe - public static Object unsafeCast(Object value, Class clazz) { - return value; + public static T unsafeCast(Object value, Class clazz) { + return (T) value; } }