cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1504445 - in /cxf/branches/2.7.x-fixes: ./ rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
Date Thu, 18 Jul 2013 12:01:34 GMT
Author: sergeyb
Date: Thu Jul 18 12:01:33 2013
New Revision: 1504445

URL: http://svn.apache.org/r1504445
Log:
Merged revisions 1504430 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1504430 | sergeyb | 2013-07-18 12:14:05 +0100 (Thu, 18 Jul 2013) | 1 line
  
  Call new Jettison Configuration only if requested by a user - should let reuse older Jettisons
if no new properties are used
........

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

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1504430

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

Modified: cxf/branches/2.7.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.7.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java?rev=1504445&r1=1504444&r2=1504445&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
Thu Jul 18 12:01:33 2013
@@ -518,8 +518,12 @@ public class JSONProvider<T> extends Abs
         if (!dropElementsInXmlStream && super.outDropElements != null) {
             config.setIgnoredElements(outDropElements);
         }
-        config.setWriteNullAsString(writeNullAsString);
-        config.setDropRootElement(dropRootElement && !dropElementsInXmlStream);
+        if (!writeNullAsString) {
+            config.setWriteNullAsString(writeNullAsString);
+        }
+        if (dropRootElement && !dropElementsInXmlStream) {
+            config.setDropRootElement(true);
+        }
         if (ignoreNamespaces && serializeAsArray && arrayKeys == null) {
             arrayKeys = CastUtils.cast((List<?>)Collections.singletonList(qname.getLocalPart()));
         }



Mime
View raw message