[ 
https://issues.apache.org/jira/browse/TIKA-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15765208#comment-15765208
 ] 

Hudson commented on TIKA-2221:
------------------------------

UNSTABLE: Integrated in Jenkins build tika-2.x #184 (See 
[https://builds.apache.org/job/tika-2.x/184/])
 TIKA-2221 -- correctly catch and rethrow encrypted document exception 
(tallison: rev ee761ac00c1dcc80f6c4030fe81a8780c5ac9d7e)
* (edit) 
tika-parser-modules/tika-parser-office-module/src/test/java/org/apache/tika/parser/microsoft/WordParserTest.java
* (edit) 
tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java


> poi.EncryptedDocumentException not wrapped in 
> tika.exception.EncryptedDocumentException
> ---------------------------------------------------------------------------------------
>
>                 Key: TIKA-2221
>                 URL: https://issues.apache.org/jira/browse/TIKA-2221
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 1.14
>            Reporter: Matthew Caruana Galizia
>            Priority: Minor
>              Labels: encryption, office, poi
>             Fix For: 2.0, 1.15
>
>
> When parsing an encrypted Word document, a 
> org.apache.poi.EncryptedDocumentException is thrown at 
> WordExtractor.java#151. Tika catches this too far up the stack and 
> incorrectly wraps it in a plain TikaException instead of a 
> org.apache.tika.exception.EncryptedDocumentException.
> The fix would be to catch and wrap the exception correctly, for example:
> {noformat}
>         try {
>             document = new HWPFDocument(root);
>         } catch (org.apache.poi.EncryptedDocumentException e) {
>             throw new EncryptedDocumentException(e);
>         } catch (OldWordFileFormatException e) {
>             parseWord6(root, xhtml);
>             return;
>         }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to