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:04:30 UTC
svn commit: r1135908 - in /cxf/branches/2.4.x-fixes: ./
rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Author: ningjiang
Date: Wed Jun 15 03:04:30 2011
New Revision: 1135908
URL: http://svn.apache.org/viewvc?rev=1135908&view=rev
Log:
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.4.x-fixes/ (props changed)
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 15 03:04:30 2011
@@ -1 +1 @@
-/cxf/trunk:1134248,1134281,1134523,1135484
+/cxf/trunk:1134248,1134281,1134523,1135484,1135899
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 15 03:04:30 2011
@@ -1 +1 @@
-/cxf/trunk:1-1134023,1134142,1134248,1134281,1134523,1135457,1135484
+/cxf/trunk:1-1134023,1134142,1134248,1134281,1134523,1135457,1135484,1135899
Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java?rev=1135908&r1=1135907&r2=1135908&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java (original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java Wed Jun 15 03:04:30 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");