You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/10/15 19:58:04 UTC

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

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);
     }