You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2018/02/09 19:17:00 UTC

[jira] [Issue Comment Deleted] (TIKA-2571) Swallows security exception and returns null

     [ https://issues.apache.org/jira/browse/TIKA-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Allison updated TIKA-2571:
------------------------------
    Comment: was deleted

(was: Sorry...I think I found it in POI's OPCPackageContainer.  If this isn't what caused the problem, please let us know.  I'll open an issue on POI's bugzilla.

{noformat}
 catch (InvalidFormatException | RuntimeException e) {
		   IOUtils.closeQuietly(pack);
           throw e;
       }
{noformat})

> Swallows security exception and returns null
> --------------------------------------------
>
>                 Key: TIKA-2571
>                 URL: https://issues.apache.org/jira/browse/TIKA-2571
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Nik Everett
>            Priority: Minor
>
> [We|https://github.com/elastic/elasticsearch/pull/28570#issuecomment-364330623] had what looked like a Tika error when we ran our tests on Java 10. It turns out that this was caused by a [change|https://github.com/dmlloyd/openjdk/commit/0052c70c389aa5bed6e9b47e09ca887ac0ef4b2f#diff-704561497d8c3df4c77bc8f35b15ad73R825] in Java 10 to make ZipFile required accessDeclaredMembers, a permission that we don't grant ourselves. Tika made this *very* difficult to debug by catching `RuntimeException` and returning `null`. Since `SecurityException` extends `RuntimeException` we lost all debugging information that might have made this problem simple to track down. Tika should probably let `SecurityException` bubble up.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)