cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Minor update to JAXB provider for it to prevent handling Document objects in cases where no type info is available
Date Fri, 21 Feb 2014 17:01:10 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 81e9f1470 -> 658f1f2ec


Minor update to JAXB provider for it to prevent handling Document objects in cases where no
type info is available


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

Branch: refs/heads/2.7.x-fixes
Commit: 658f1f2ec67c2b5c64bad6e0aad06be1450711b2
Parents: 81e9f14
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Feb 21 16:59:16 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Feb 21 17:00:23 2014 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/jaxrs/provider/JAXBElementProvider.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/658f1f2e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
index bc61930..67e011e 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
@@ -56,6 +56,8 @@ import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Source;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.ext.Nullable;
@@ -101,6 +103,10 @@ public class JAXBElementProvider<T> extends AbstractJAXBProvider<T>
 {
         
     }
     
+    protected boolean objectFactoryOrIndexAvailable(Class<?> type) {
+        return !Document.class.isAssignableFrom(type) && super.objectFactoryOrIndexAvailable(type);

+    }
+    
     public void setXmlResourceOffset(String value) {
         xmlResourceOffset = value;
     }


Mime
View raw message