You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2008/06/30 18:05:02 UTC

svn commit: r672804 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java

Author: doogie
Date: Mon Jun 30 09:05:01 2008
New Revision: 672804

URL: http://svn.apache.org/viewvc?rev=672804&view=rev
Log:
Add another helper method to hide generics warnings.

Modified:
    ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java?rev=672804&r1=672803&r2=672804&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilGenerics.java Mon Jun 30 09:05:01 2008
@@ -29,6 +29,11 @@
 
     public static final String module = UtilMisc.class.getName();
 
+    @SuppressWarnings("unchecked")
+    public static <V> V cast(Object object) {
+        return (V) object;
+    }
+
     private static <C extends Collection<?>> C checkCollectionCast(Object object, Class<C> clz) {
         return clz.cast(object);
     }