RFR: 8368831: ResourceParsingClassHierarchyResolver.getClassInfo(ClassDesc) throws unspecified UncheckedIOException [v2]

Adam Sotona asotona at openjdk.org
Tue Sep 30 14:06:56 UTC 2025


On Mon, 29 Sep 2025 21:21:38 GMT, Chen Liang <liach at openjdk.org> wrote:

>> ClassHierarchyResolver provided by users may sporadically run into exceptions due to reasons out of control, such as UncheckedIOException caused by a bad zip header. We should specify that users are allowed to fail their CHR when they encounter a failure when they support a ClassDesc to avoid hiding errors.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix non-IAE propagation

src/java.base/share/classes/jdk/internal/classfile/impl/ClassHierarchyImpl.java line 79:

> 77:         } catch (Exception ex) {
> 78:             if (ex instanceof IllegalArgumentException iae)
> 79:                 throw iae;

Suggestion:

        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (RuntimeException ex) {

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27559#discussion_r2391644062


More information about the core-libs-dev mailing list