diff --git a/src/integrationtest/org/apache/poi/TestAllFiles.java b/src/integrationtest/org/apache/poi/TestAllFiles.java index 3dafca291..f3d79eb17 100644 --- a/src/integrationtest/org/apache/poi/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/TestAllFiles.java @@ -230,10 +230,10 @@ public class TestAllFiles { FILE_PASSWORD = Collections.unmodifiableMap(passmap); } - private static final Set unmodifiableHashSet(String... a) { + private static Set unmodifiableHashSet(String... a) { return Collections.unmodifiableSet(hashSet(a)); } - private static final Set hashSet(String... a) { + private static Set hashSet(String... a) { return new HashSet(Arrays.asList(a)); } @@ -249,6 +249,7 @@ public class TestAllFiles { "document/Bug60936.doc", "document/Bug60942.doc", "document/Bug60942b.doc", + "document/cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC", "hpsf/TestMickey.doc", "document/52117.doc", "hpsf/TestInvertedClassID.doc", diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java index fc1011470..af7c8c167 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java @@ -17,11 +17,16 @@ package org.apache.poi.hwpf.extractor; +import org.apache.poi.POIDataSamples; +import org.apache.poi.POITextExtractor; +import org.apache.poi.extractor.OLE2ExtractorFactory; +import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; +import org.junit.Test; + import java.io.IOException; import java.io.InputStream; -import org.apache.poi.POIDataSamples; -import org.junit.Test; +import static org.junit.Assert.assertNotNull; /** * Tests for bugs with the WordExtractor @@ -52,4 +57,15 @@ public final class TestWordExtractorBugs { extractor.getText(); extractor.close(); } + + @Test + public void testBug60374() throws Exception { + NPOIFSFileSystem fs = new NPOIFSFileSystem(SAMPLES.openResourceAsStream("cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC")); + final POITextExtractor extractor = OLE2ExtractorFactory.createExtractor(fs); + + // Check it gives text without error + assertNotNull(extractor.getText()); + + extractor.close(); + } } diff --git a/test-data/document/cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC b/test-data/document/cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC new file mode 100644 index 000000000..5a9f0d24c Binary files /dev/null and b/test-data/document/cn.orthodox.www_divenbog_APRIL_30-APRIL.DOC differ