cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1241195 - in /cxf/trunk/rt/frontend/jaxrs/src: main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
Date Mon, 06 Feb 2012 21:40:22 GMT
Author: sergeyb
Date: Mon Feb  6 21:40:21 2012
New Revision: 1241195

URL: http://svn.apache.org/viewvc?rev=1241195&view=rev
Log:
[CXF-4088] Checking getGenericSuperclass when selecting providers

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=1241195&r1=1241194&r2=1241195&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Mon Feb  6 21:40:21 2012
@@ -884,6 +884,10 @@ public final class ProviderFactory {
         if (Object.class == cls) {
             return new Type[]{};
         }
+        Type genericSuperCls = cls.getGenericSuperclass();
+        if (genericSuperCls instanceof ParameterizedType) {
+            return new Type[]{genericSuperCls};
+        }
         Type[] types = cls.getGenericInterfaces();
         if (types.length > 0) {
             return types;

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java?rev=1241195&r1=1241194&r2=1241195&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
Mon Feb  6 21:40:21 2012
@@ -388,7 +388,6 @@ public class ProviderFactoryTest extends
     }
     
     @Test
-    @Ignore
     public void testExceptionMappersHierarchyWithGenerics() throws Exception {
         ProviderFactory pf = ProviderFactory.getInstance();
         RuntimeExceptionMapper1 exMapper1 = new RuntimeExceptionMapper1(); 



Mime
View raw message