Revision: 2097 http://aperture.svn.sourceforge.net/aperture/?rev=2097&view=rev Author: mylka Date: 2009-10-08 23:54:45 +0000 (Thu, 08 Oct 2009) Log Message: ----------- a little fix in the WordExtractor that fixes a regression visible when parsing old word document versions Modified Paths: -------------- aperture/trunk/core/extractor/microsoft/office/src/main/java/org/semanticdesktop/aperture/extractor/word/WordExtractor.java Modified: aperture/trunk/core/extractor/microsoft/office/src/main/java/org/semanticdesktop/aperture/extractor/word/WordExtractor.java =================================================================== --- aperture/trunk/core/extractor/microsoft/office/src/main/java/org/semanticdesktop/aperture/extractor/word/WordExtractor.java 2009-10-08 23:23:56 UTC (rev 2096) +++ aperture/trunk/core/extractor/microsoft/office/src/main/java/org/semanticdesktop/aperture/extractor/word/WordExtractor.java 2009-10-08 23:54:45 UTC (rev 2097) @@ -144,7 +144,13 @@ } private void extractSaveHistory(POIFSFileSystem fileSystem, RDFContainer container) throws IOException { - HWPFDocument document = new HWPFDocument(fileSystem); + HWPFDocument document = null; + try { + document = new HWPFDocument(fileSystem); + } catch (IllegalStateException e) { + // this happens on files from early word versions, just bail out + return; + } SavedByTable table = document.getSavedByTable(); if (table == null) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |