[jboss-svn-commits] JBoss Common SVN: r2518 - common-core/trunk/src/main/java/org/jboss/util/collection.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Aug 28 06:59:48 EDT 2007
Author: adrian at jboss.org
Date: 2007-08-28 06:59:48 -0400 (Tue, 28 Aug 2007)
New Revision: 2518
Modified:
common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java
Log:
This looks like a bug in the Sun compiler?
Modified: common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java
===================================================================
--- common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java 2007-08-28 10:52:18 UTC (rev 2517)
+++ common-core/trunk/src/main/java/org/jboss/util/collection/WeakTypeCache.java 2007-08-28 10:59:48 UTC (rev 2518)
@@ -54,7 +54,7 @@
* @param type the type
* @return the info
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "cast"})
public T get(Type type)
{
if (type == null)
@@ -65,7 +65,8 @@
else if (type instanceof Class)
return getClass((Class<?>) type);
else if (type instanceof TypeVariable)
- return getTypeVariable((TypeVariable) type);
+ // TODO Figure out why we need this cast with the Sun compiler?
+ return (T) getTypeVariable((TypeVariable) type);
else if (type instanceof GenericArrayType)
return getGenericArrayType((GenericArrayType) type);
else if (type instanceof WildcardType)
More information about the jboss-svn-commits
mailing list