RFR: 8343981: Remove usage of security manager from Thread and related classes [v4]

Roger Riggs rriggs at openjdk.org
Tue Nov 12 22:12:30 UTC 2024


On Tue, 12 Nov 2024 18:47:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Removes the SecurityManager usage from Thread + friends.
>> 
>> In Thread, the getContextClassLoader method is no longer caller-sensitive method.
>> 
>> JavaLangAccess.newThreadWithAcc is removed and jdk.internal.access is no longer exported to java.naming. The usage of newThreadWithAcc is removed from com.sun.jndi.ldap.VersionHelper. There will be further work on the java.naming module to remove usage of SM, the change here is specific to the usage of ewThreadWithAcc.
>
> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 227 commits:
> 
>  - Merge branch 'master' into JDK-8343981
>  - Merge commit 'db85090553ab14a84c3ed0a2604dd56c5b6e6982' into JDK-8343981
>  - Initial commit
>  - Merge remote-tracking branch 'jdk-sandbox/jep486' into JDK-8338411
>  - Merge branch 'master' into jep486
>  - Move remaining JEP 486 failing tests into correct groups.
>  - Move JEP 486 failing tests into hotspot_runtime group.
>  - test/jdk/java/rmi/server/RMIClassLoader/spi/DefaultProperty.java failing
>  - Merge branch 'master' into jep486
>  - Merge branch 'master' into jep486
>  - ... and 217 more: https://git.openjdk.org/jdk/compare/63eb4853...636ebd19

src/java.naming/share/classes/com/sun/jndi/ldap/VersionHelper.java line 111:

> 109: 
> 110:     Thread createThread(Runnable r) {
> 111:         return new Thread(r);

Can the refactoring go back to the callers of createThread() to just create threads themselves.
And remove this trivial method.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22035#discussion_r1838835532


More information about the core-libs-dev mailing list