Просмотр исходного кода

Do not wrap RuntimeException so we still can handle them directly

This broke the CI when the "JCE Unlimited Strength Jurisdiction Policy files"
are missing, e.g. on some Windows Jenkins nodes.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884529 13f79535-47bb-0310-9956-ffa450edef68
tags/before_junit5_update
Dominik Stadler 3 лет назад
Родитель
Сommit
71d6bf0306

+ 3
- 0
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;


+ 1
- 1
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);

Загрузка…
Отмена
Сохранить