EXPECTED_FAILURES.add("spreadsheet/43493.xls");
EXPECTED_FAILURES.add("spreadsheet/46904.xls");
EXPECTED_FAILURES.add("document/Bug50955.doc");
+ EXPECTED_FAILURES.add("document/57843.doc");
EXPECTED_FAILURES.add("slideshow/PPT95.ppt");
EXPECTED_FAILURES.add("openxml4j/OPCCompliance_CoreProperties_DCTermsNamespaceLimitedUseFAIL.docx");
EXPECTED_FAILURES.add("openxml4j/OPCCompliance_CoreProperties_DoNotUseCompatibilityMarkupFAIL.docx");
import org.apache.poi.hwpf.model.SubdocumentType;
import org.apache.poi.hwpf.model.io.HWPFOutputStream;
import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
HWPFDocument hwpfDocument2 = HWPFTestDataSamples.writeOutAndReadBack(hwpfDocument);
assertNotNull(hwpfDocument2);
}
+
+ public void test57843() throws IOException {
+ try {
+ File f = POIDataSamples.getDocumentInstance().getFile("57843.doc");
+ boolean readOnly = true;
+ POIFSFileSystem fs = new POIFSFileSystem(f, readOnly);
+ HWPFOldDocument doc = new HWPFOldDocument(fs);
+ assertNotNull(doc);
+ doc.close();
+ fs.close();
+ fixed("57843");
+ } catch (ArrayIndexOutOfBoundsException e) {
+ // expected until this bug is fixed
+ }
+ }
}