You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2011/06/15 05:28:54 UTC
svn commit: r1135909 - in /cxf/branches/2.3.x-fixes: ./
rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Author: ningjiang
Date: Wed Jun 15 03:28:54 2011
New Revision: 1135909
URL: http://svn.apache.org/viewvc?rev=1135909&view=rev
Log:
Merged revisions 1135908 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................
r1135908 | ningjiang | 2011-06-15 11:04:30 +0800 (Wed, 15 Jun 2011) | 9 lines
Merged revisions 1135899 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1135899 | ningjiang | 2011-06-15 10:35:09 +0800 (Wed, 15 Jun 2011) | 1 line
CXF-3590 fixed the Exception of Logging*Interceptor when the CachedOutputStream size is 0
........
................
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 15 03:28:54 2011
@@ -1,2 +1,2 @@
-/cxf/branches/2.4.x-fixes:1135488
-/cxf/trunk:1135484
+/cxf/branches/2.4.x-fixes:1135488,1135908
+/cxf/trunk:1135484,1135899
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java?rev=1135909&r1=1135908&r2=1135909&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java (original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java Wed Jun 15 03:28:54 2011
@@ -102,8 +102,8 @@ public abstract class AbstractLoggingInt
protected void writePayload(StringBuilder builder, CachedOutputStream cos,
String encoding, String contentType)
throws Exception {
- // Just transform the XML message
- if (isPrettyLogging() && (contentType != null && contentType.indexOf("xml") >= 0)) {
+ // Just transform the XML message when the cos has content
+ if (isPrettyLogging() && (contentType != null && contentType.indexOf("xml") >= 0) && cos.size() > 0) {
Transformer serializer = XMLUtils.newTransformer(2);
// Setup indenting to "pretty print"
serializer.setOutputProperty(OutputKeys.INDENT, "yes");