Skip to content

Let ZipException bubble up from JarAnalyzer constructor (#144) - #148

Open
elharo wants to merge 1 commit into
masterfrom
fix/issue-144-zip-exception-bubbles-up
Open

Let ZipException bubble up from JarAnalyzer constructor (#144)#148
elharo wants to merge 1 commit into
masterfrom
fix/issue-144-zip-exception-bubbles-up

Conversation

@elharo

@elharo elharo commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #144

Removed the redundant catch (ZipException) block in the JarAnalyzer constructor. It re-wrapped the exception with a new message and a misleadingly-named ioe variable, adding no information beyond the original exception.

The constructor already declares throws IOException (and ZipException is a subclass), so the original exception now propagates unchanged. Also removed the now-unused java.util.zip.ZipException import.

The existing invalidJarFile test (which asserts ZipException is thrown for an invalid JAR) still passes.

Remove the redundant catch block that re-wrapped the ZipException with a
new message and misleading 'ioe' variable name. The constructor already
declares 'throws IOException', so the original exception now propagates
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant ZipException re-wrap with misleading variable name in JarAnalyzer constructor

1 participant