cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6101] Updating JAXRSBinding not to set a text/xml by default
Date Fri, 14 Nov 2014 11:38:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 9ff85bdbb -> 3b688a0d6


[CXF-6101] Updating JAXRSBinding not to set a text/xml by default


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3b688a0d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3b688a0d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3b688a0d

Branch: refs/heads/3.0.x-fixes
Commit: 3b688a0d6dd14b90e91a021bea0e7b7f644d4254
Parents: 9ff85bd
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Nov 14 11:36:30 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Nov 14 11:37:45 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java     | 2 +-
 .../jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java    | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3b688a0d/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
index 005a494..6c0d3ce 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/FIStaxOutInterceptor.java
@@ -122,7 +122,7 @@ public class FIStaxOutInterceptor extends AbstractPhaseInterceptor<Message>
{
                   Boolean.TRUE);
 
             String s = (String)message.get(Message.CONTENT_TYPE);
-            if (s.contains("application/soap+xml")) {
+            if (s != null && s.contains("application/soap+xml")) {
                 s = s.replace("application/soap+xml", "application/soap+fastinfoset");
                 message.put(Message.CONTENT_TYPE, s);
             } else {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3b688a0d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
index 1f74030..92687e8 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSBinding.java
@@ -52,9 +52,6 @@ public class JAXRSBinding extends AbstractBasicInterceptorProvider implements
Bi
             if (exchange != null) {
                 ct = (String)exchange.get(org.apache.cxf.message.Message.CONTENT_TYPE);
             }
-            if (ct == null) {
-                ct = "text/xml";
-            }
             m.put(org.apache.cxf.message.Message.CONTENT_TYPE, ct);
         }
         return m;


Mime
View raw message