RFR: 8304425: ClassHierarchyResolver from Reflection [v7]

Chen Liang liach at openjdk.org
Tue May 9 15:09:54 UTC 2023


On Wed, 26 Apr 2023 09:47:58 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> > @asotona Just curious, what's the current state of our new API model of caching class hierarchy info in a Classfile context object as we've discussed on the mailing list? Will you create a patch, or should I update this patch to that model?
> 
> In the discussion I tried to fine-tune exact naming of the factory methods and the default. Mainly to differentiate when the class is parsed as a resource `ofResourceParsing(ClassLoader loader)` and when it is loaded `ofClassLoading(ClassLoader loader)`
> 
> Otherwise this patch looks good.
> 
> The other part of the discussion with proposed `ClassfileReaderWriter` model is out of the scope of this topic, it has much bigger impact on all existing code and I would deferred it at least until this and other open PRs are merged.

Thanks for your evaluation, Adam. I have updated the method names to `ofClassLoading` and `ofResourceParsing`, and incorporated the idea of SecurityManager bypassing from https://github.com/openjdk/jdk/pull/13197/commits/cc6994202c93edd0c98e6fb0bb5f0cbe1da7df8e#diff-f044f7ab894bab3b36ad9f29e0b3f541df5246c90159635159343ce20e02c12cR54-R63 to ensure system libraries can use the hierarchy resolver all fine. I've ran `test/jdk/jdk/classfile` tests on my machine. Can you review again?

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

PR Comment: https://git.openjdk.org/jdk/pull/13082#issuecomment-1540326710


More information about the core-libs-dev mailing list