Author: centic
Date: Wed Dec 16 20:55:14 2020
New Revision: 1884529

URL: http://svn.apache.org/viewvc?rev=1884529&view=rev
Log:
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.

Modified:
    poi/trunk/src/java/org/apache/poi/extractor/ExtractorProvider.java
    
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java

Modified: poi/trunk/src/java/org/apache/poi/extractor/ExtractorProvider.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/extractor/ExtractorProvider.java?rev=1884529&r1=1884528&r2=1884529&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/extractor/ExtractorProvider.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/extractor/ExtractorProvider.java Wed Dec 
16 20:55:14 2020
@@ -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;
 

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java?rev=1884529&r1=1884528&r2=1884529&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
 Wed Dec 16 20:55:14 2020
@@ -271,7 +271,7 @@ public final class POIXMLExtractorFactor
                 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);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to