maven-dependency-analyzer icon indicating copy to clipboard operation
maven-dependency-analyzer copied to clipboard

ConstantPoolParser throws raw RuntimeException

Open elharo opened this issue 6 months ago • 0 comments

Affected version

HEAD

Bug description

from parseConstantPoolClassReferences which is reading external data (.class files specifically) so this really should be a checked exception, but even if we leave it a runtime exception it should be a more semantically meaningful subclass per Effective Java. Maybe something like java.io.InvalidClassException?

Furthermore, it's a bug because the code in visitClass that ultimately invokes this private method does not catch RuntimeException, only more specific subclasses like IllegalArgumenException.

elharo avatar Apr 18 '25 14:04 elharo