aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2024-04-20 07:53:35 +0000
committerDominik Stadler <centic@apache.org>2024-04-20 07:53:35 +0000
commit8c101982e029100b74b4c18f8743fa35e4ec63ff (patch)
treec1ca649c158b19520195a7c7101305082962741f /poi-integration
parentd87ffbc1b06405c463b7896b7e8dafd97e2539fa (diff)
downloadpoi-8c101982e029100b74b4c18f8743fa35e4ec63ff.tar.gz
poi-8c101982e029100b74b4c18f8743fa35e4ec63ff.zip
Integration tests: Add writing out the document
This will cover some more functionality git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java
index d588af7df5..9b31a61881 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java
@@ -22,6 +22,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Set;
+import org.apache.commons.io.output.NullOutputStream;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.junit.jupiter.api.Test;
@@ -41,6 +42,8 @@ public class XWPFFileHandler extends AbstractFileHandler {
try (XWPFDocument doc = new XWPFDocument(stream)) {
new POIXMLDocumentHandler().handlePOIXMLDocument(doc);
POIXMLDocumentHandler.cursorRecursive(doc.getDocument());
+
+ doc.write(NullOutputStream.INSTANCE);
} catch (POIXMLException e) {
Exception cause = (Exception)e.getCause();
throw cause == null ? e : cause;