cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r825592 - /cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
Date Thu, 15 Oct 2009 17:58:04 GMT
Author: dkulp
Date: Thu Oct 15 17:58:03 2009
New Revision: 825592

URL: http://svn.apache.org/viewvc?rev=825592&view=rev
Log:
Fix test on 2.2

Modified:
    cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java

Modified: cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java?rev=825592&r1=825591&r2=825592&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AbstractTypeCreator.java
Thu Oct 15 17:58:03 2009
@@ -153,11 +153,16 @@
             throw new UnsupportedOperationException("To use holder types "
                     + "you must have an XML descriptor declaring the component type.");
         }
-
-        Class heldCls = (Class) info.getGenericType();
-        info.setTypeClass(heldCls);
-
-        return createType(heldCls);
+        Object o = info.getGenericType();
+        if (o instanceof Class) { 
+            Class heldCls = (Class)o;
+            info.setTypeClass(heldCls);
+            return createType(heldCls);
+        }
+        ParameterizedType pt = (ParameterizedType) info.getGenericType();
+        Class c = (Class)pt.getActualTypeArguments()[0]; 
+        info.setTypeClass(c);
+        return createType(c);
     }
 
 



Mime
View raw message