changeset 11307:da412706d0fd

Small adjustment to CompilerDirectives.unsafeCast.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 14 Aug 2013 15:44:05 +0200
parents 2a26b86d7724
children 77167d6f868c
files graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Wed Aug 14 14:27:52 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java	Wed Aug 14 15:44:05 2013 +0200
@@ -172,10 +172,9 @@
      * @param customType the custom type that if present on a value makes this unsafe cast safe
      * @return the value
      */
-    @SuppressWarnings("unchecked")
     @Unsafe
     public static <T> T unsafeCast(Object value, Class<T> clazz, Object customType) {
-        return (T) value;
+        return unsafeCast(value, clazz);
     }
 
     /**