cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1423982 - /cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
Date Wed, 19 Dec 2012 17:43:52 GMT
Author: dkulp
Date: Wed Dec 19 17:43:52 2012
New Revision: 1423982

URL: http://svn.apache.org/viewvc?rev=1423982&view=rev
Log:
[CXF-4708] Remove an unnessary cast that was failing in some cases

Modified:
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java?rev=1423982&r1=1423981&r2=1423982&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java (original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java Wed Dec 19
17:43:52 2012
@@ -200,13 +200,13 @@ final class Utils {
 
     static Class<?> getFieldType(Field f) {
         XmlJavaTypeAdapter adapter = getFieldXJTA(f);
-        Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+        Class<?> adapterType = (Class<?>)getTypeFromXmlAdapter(adapter);
         return adapterType != null ? adapterType : f.getType();
     }
 
     static Class<?> getMethodReturnType(Method m) {
         XmlJavaTypeAdapter adapter = getMethodXJTA(m);
-        Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+        Class<?> adapterType = (Class<?>)getTypeFromXmlAdapter(adapter);
         return adapterType != null ? adapterType : m.getReturnType(); 
     }
 
@@ -282,7 +282,7 @@ final class Utils {
         return adapter;
     }
 
-    static Class<?> getTypeFromXmlAdapter(XmlJavaTypeAdapter xjta) {
+    static Type getTypeFromXmlAdapter(XmlJavaTypeAdapter xjta) {
         if (xjta != null) {
             Class<?> c2 = xjta.value();
             Type sp = c2.getGenericSuperclass();
@@ -291,7 +291,7 @@ final class Utils {
                 c2 = c2.getSuperclass();
             }
             if (sp instanceof ParameterizedType) {
-                return (Class<?>)((ParameterizedType)sp).getActualTypeArguments()[0];
+                return ((ParameterizedType)sp).getActualTypeArguments()[0];
             }
         }
         return null;



Mime
View raw message