cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1362438 - in /cxf/branches/2.6.x-fixes: ./ rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
Date Tue, 17 Jul 2012 10:35:25 GMT
Author: sergeyb
Date: Tue Jul 17 10:35:24 2012
New Revision: 1362438

URL: http://svn.apache.org/viewvc?rev=1362438&view=rev
Log:
Merged revisions 1362437 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1362437 | sergeyb | 2012-07-17 11:22:23 +0100 (Tue, 17 Jul 2012) | 1 line
  
  [CXF-4426] Fixing JSONProvider not to loose the actual class type after the adapter has
been used for interfaces
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1362437

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java?rev=1362438&r1=1362437&r2=1362438&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
Tue Jul 17 10:35:24 2012
@@ -349,7 +349,8 @@ public class JSONProvider<T> extends Abs
                 marshalCollection(cls, obj, genericType, enc, os, m, anns);
             } else {
                 Object actualObject = checkAdapter(obj, cls, anns, true);
-                Class<?> actualClass = obj != actualObject ? actualObject.getClass()
: cls;
+                Class<?> actualClass = obj != actualObject || cls.isInterface() 
+                    ? actualObject.getClass() : cls;
                 if (cls == genericType) {
                     genericType = actualClass;
                 }



Mime
View raw message