tika-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1303810 - /tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java
Date Thu, 22 Mar 2012 14:44:15 GMT
Author: maxcom
Date: Thu Mar 22 14:44:15 2012
New Revision: 1303810

URL: http://svn.apache.org/viewvc?rev=1303810&view=rev
Log:
TIKA-882 - ignore incorrect part references in OOXML Extractor

Modified:
    tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java

Modified: tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java
URL: http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java?rev=1303810&r1=1303809&r2=1303810&view=diff
==============================================================================
--- tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java
(original)
+++ tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/AbstractOOXMLExtractor.java
Thu Mar 22 14:44:15 2012
@@ -115,7 +115,13 @@ public abstract class AbstractOOXMLExtra
             for (PackagePart source : getMainDocumentParts()) {
                 for (PackageRelationship rel : source.getRelationships()) {
                     if (rel.getTargetMode() == TargetMode.INTERNAL) {
-                        PackagePart target = source.getRelatedPart(rel);
+                        PackagePart target;
+
+                        try {
+                            target = source.getRelatedPart(rel);
+                        } catch (IllegalArgumentException ex) {
+                            continue;
+                        }
 
                         String type = rel.getRelationshipType();
                         if (RELATION_OLE_OBJECT.equals(type)



Mime
View raw message