cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r811179 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
Date Fri, 04 Sep 2009 00:03:02 GMT
Author: bimargulies
Date: Fri Sep  4 00:03:02 2009
New Revision: 811179

URL: http://svn.apache.org/viewvc?rev=811179&view=rev
Log:
use Class.asSubclass to avoid a SuppressWarnings.

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java?rev=811179&r1=811178&r2=811179&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
Fri Sep  4 00:03:02 2009
@@ -46,13 +46,12 @@
         this.annotationReader = annotationReader;
     }
     
-    @SuppressWarnings("unchecked")
     public static Class<? extends AegisType> castToAegisTypeClass(Class<?> c)
{
         if (c == null) {
             return null;
         }
         if (AegisType.class.isAssignableFrom(c)) {
-            return (Class<? extends AegisType>)c;
+            return c.asSubclass(AegisType.class);
         } else {
             throw new DatabindingException("Invalid Aegis type annotation to non-type class"
+ c);
         }



Mime
View raw message