Skip to content

Commit 1bfe12a

Browse files
committed
fix #598, #592 (alternative implementation to #594 ) - set isCoalescing property to true on XMLInputFactory since in a certain environment the underlying stax implementation was breaking up one XML text node into multiple because the HTTP stream was chunked, and this was breaking parsing of the JSON in that text node
1 parent 7ee7589 commit 1bfe12a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/marklogic/client/io/SearchHandle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ protected void receiveContent(InputStream content) {
161161
XMLInputFactory factory = XMLInputFactory.newFactory();
162162
factory.setProperty("javax.xml.stream.isNamespaceAware", true);
163163
factory.setProperty("javax.xml.stream.isValidating", false);
164+
factory.setProperty("javax.xml.stream.isCoalescing", true);
164165

165166
XMLEventReader reader = factory.createXMLEventReader(content, "UTF-8");
166167
SearchResponseImpl response = new SearchResponseImpl();

0 commit comments

Comments
 (0)