On Tue, 30 Sep 2025 23:42:13 GMT, Chen Liang <[email protected]> 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 with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains four additional commits since > the last revision: > > - Merge branch 'master' of https://github.com/openjdk/jdk into > doc/chr-exception > - Update > src/java.base/share/classes/jdk/internal/classfile/impl/ClassHierarchyImpl.java > > Co-authored-by: Adam Sotona <[email protected]> > - Fix non-IAE propagation > - Allow ClassHierarchyResolver to throw RuntimeException Withdrawing this. Spec for [`ClassHierachyResolver.ofResourceParsing`](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/ClassHierarchyResolver.html#ofResourceParsing(java.util.function.Function)) states: > Any > [IOException](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/IOException.html) > from the provided input stream is rethrown as an > [UncheckedIOException](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/UncheckedIOException.html) > in > [getClassInfo(ClassDesc)](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/classfile/ClassHierarchyResolver.html#getClassInfo(java.lang.constant.ClassDesc)). ------------- PR Comment: https://git.openjdk.org/jdk/pull/27559#issuecomment-3534248154
