RFR: 8344011: Remove usage of security manager from Class and reflective APIs [v2]

Sean Mullan mullan at openjdk.org
Wed Nov 13 22:35:23 UTC 2024


On Wed, 13 Nov 2024 19:05:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Remove code required for the now defunct SecurityManager execution mode from java.lang.Class, friends, and reflection APIs. Careful review is required so I've set Reviewer to 2. I've tried to keep the changes as easy to review as possible and not go over board with cleanup.
>> 
>> sun.reflect.misc.ReflectUtil are been hollowed out. A future pass will remove empty methods and qualified exports once the changes in "far away" code and modules is done.
>> 
>> In Lookup's class description, the removal of the sentence "avoid package access checks for classes accessible to the lookup class"  and the link to the removed "Security manager interactions" section is in discussion/non-normative text, just missed in the JEP 486 update that remove the linked section.
>> 
>> runtime/cds/appcds/StaticArchiveWithLambda.java is updated as creating the archive no longer skips a generated class.
>> 
>> Testing: tier1-5
>
> Alan Bateman 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 three additional commits since the last revision:
> 
>  - StaticArchiveWithLambda no longer skips dynamically generated class when creating archive
>  - Merge branch 'master' into JDK-8344011
>  - Initial commit

Reviewed most of it, so far only couple of minor comments, can try to finish up tomorrow.

src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line 1:

> 1: /*

Lines 55-57, can the "access to the constructor" part be removed from the comment?

src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line 1:

> 1: /*

Line 82: is `GetReflectionFactoryAction` still needed?

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

PR Review: https://git.openjdk.org/jdk/pull/22063#pullrequestreview-2434601792
PR Review Comment: https://git.openjdk.org/jdk/pull/22063#discussion_r1841266005
PR Review Comment: https://git.openjdk.org/jdk/pull/22063#discussion_r1841267049


More information about the core-libs-dev mailing list