FILE_PASSWORD = Collections.unmodifiableMap(passmap);
}
- private static final Set<String> unmodifiableHashSet(String... a) {
+ private static Set<String> unmodifiableHashSet(String... a) {
return Collections.unmodifiableSet(hashSet(a));
}
- private static final Set<String> hashSet(String... a) {
+ private static Set<String> hashSet(String... a) {
return new HashSet<String>(Arrays.asList(a));
}
"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",
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
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();
+ }
}