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 d588af7df58..9b31a61881b 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 @@ Licensed to the Apache Software Foundation (ASF) under one or more 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 void handleFile(InputStream stream, String path) throws Exception { 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; diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 0c9f7271897..e784502ec93 100644 Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ