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 16:59:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c886ce37f -> f52704565


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/f5270456
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f5270456
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f5270456

Branch: refs/heads/master
Commit: f527045653f3c8a5877eb66efe4cfdd789a732b8
Parents: c886ce3
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 16:59:16 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/f5270456/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 215bc8a..77a73e1 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