ppkarwasz commented on code in PR #723:
URL: https://github.com/apache/commons-compress/pull/723#discussion_r2424891951


##########
src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java:
##########
@@ -128,6 +125,8 @@ private ArjArchiveInputStream(final InputStream 
inputStream, final Builder build
             if ((mainHeader.arjFlags & MainHeader.Flags.VOLUME) != 0) {
                 throw new ArchiveException("Multi-volume ARJ files are 
unsupported");
             }
+        } catch (final ArchiveException e) {
+            throw e;
         } catch (final IOException e) {
             throw new ArchiveException(e.getMessage(), (Throwable) e);

Review Comment:
   That’s an excellent point! :100:
   
   The new `Builder.get()` method declares `throws Exception`, but many of the 
older or deprecated constructors either don’t declare any checked exceptions or 
use `ArchiveException`. To avoid **source** incompatibility, we had to add 
extra “helper” constructors.
   
   Since we’ve already introduced some **source-incompatible** changes 
elsewhere in Commons Compress, maybe it’s simpler to just have the old 
constructor declare `throws IOException`. What do you think?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to