Author: doogie
Date: Mon Jun 30 09:05:01 2008
New Revision: 672804
URL:
http://svn.apache.org/viewvc?rev=672804&view=revLog:
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);
}