cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r657490 - in /cxf/trunk/rt/databinding/aegis/src: main/java/org/apache/cxf/aegis/type/java5/ test/java/org/apache/cxf/aegis/type/java5/map/
Date Sun, 18 May 2008 02:14:34 GMT
Author: bimargulies
Date: Sat May 17 19:14:34 2008
New Revision: 657490

URL: http://svn.apache.org/viewvc?rev=657490&view=rev
Log:
Fix CXF-1587

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/java5/Java5TypeCreator.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentService.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.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=657490&r1=657489&r2=657490&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
Sat May 17 19:14:34 2008
@@ -180,9 +180,10 @@
                 paramClass = (Class)type.getActualTypeArguments()[index];
             } else if (type.getActualTypeArguments()[index] instanceof WildcardType) {
                 WildcardType wildcardType = (WildcardType)type.getActualTypeArguments()[index];
-
-                if (wildcardType.getUpperBounds()[index] instanceof Class) {
-                    paramClass = (Class)wildcardType.getUpperBounds()[index];
+                // we really aren't prepared to deal with multiple upper bounds,
+                // so we just look at the first one.
+                if (wildcardType.getUpperBounds()[0] instanceof Class) {
+                    paramClass = (Class)wildcardType.getUpperBounds()[0];
                 }
             } else if (type.getActualTypeArguments()[index] instanceof ParameterizedType)
{
                 ParameterizedType ptype = (ParameterizedType)type.getActualTypeArguments()[index];

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentService.java?rev=657490&r1=657489&r2=657490&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentService.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentService.java
Sat May 17 19:14:34 2008
@@ -32,6 +32,8 @@
     Student findStudent(Long id);
 
     Map<Long, Student> getStudentsMap();
+    
+    Map<String, ?> getWildcardMap();
 
     List<Student> getStudents(Map<String, String> filters);
 

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java?rev=657490&r1=657489&r2=657490&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentServiceImpl.java
Sat May 17 19:14:34 2008
@@ -63,4 +63,10 @@
         return studentMap;
     }
 
+    public Map<String, ?> getWildcardMap() {
+        Map<String, String> m = new HashMap<String, String>();
+        m.put("keystring", "valuestring");
+        return m;
+    }
+
 }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java?rev=657490&r1=657489&r2=657490&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/map/StudentTest.java
Sat May 17 19:14:34 2008
@@ -69,6 +69,8 @@
         assertNotNull(one);
         assertEquals("Student1", one.getName());
         
+        Map<String, ?> wildMap = clientInterface.getWildcardMap();
+        assertEquals("valuestring", wildMap.get("keystring"));
     }
 
     @Test 



Mime
View raw message