diff options
-rw-r--r-- | src/java/org/apache/poi/extractor/ExtractorProvider.java | 3 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/extractor/ExtractorProvider.java b/src/java/org/apache/poi/extractor/ExtractorProvider.java index ccbeee15d0..5669cd9fe7 100644 --- a/src/java/org/apache/poi/extractor/ExtractorProvider.java +++ b/src/java/org/apache/poi/extractor/ExtractorProvider.java @@ -53,6 +53,9 @@ public interface ExtractorProvider { * @param password the password or {@code null} if not encrypted * @return the extractor * @throws IOException if node can't be parsed + * @throws IllegalStateException if processing fails for some other reason, + * e.g. missing JCE Unlimited Strength Jurisdiction Policy files + * while handling encrypted files. */ POITextExtractor create(DirectoryNode poifsDir, String password) throws IOException; diff --git a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java index 088e09c3fe..2a5a9d86f7 100644 --- a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java +++ b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java @@ -271,7 +271,7 @@ public final class POIXMLExtractorFactory implements ExtractorProvider { try (InputStream is = dec.getDataStream(poifsDir)) { return create(is, password); } - } catch (IOException e) { + } catch (IOException | RuntimeException e) { throw e; } catch (Exception e) { throw new IOException(e); |