RFR: 8344197: SM cleanup in java.util.concurrent

Glavo duke at openjdk.org
Fri Nov 15 10:19:22 UTC 2024


On Fri, 15 Nov 2024 07:25:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Refactored to remove use of doPrivileged() and use of SecurityManager.
>> The DefaultForkJoinWorkerThreadFactory no longer uses the SM to target a common thread pool.
>> 
>> A careful review is requested.
>
> src/java.base/share/classes/java/util/concurrent/Executors.java line 556:
> 
>> 554:      * A callable that runs under established access control settings.
>> 555:      */
>> 556:     private static final class PrivilegedCallable<T> implements Callable<T> {
> 
> I can't help thinking some larger cleanup or renaming will be needed here as PrivilegedXXX is misleading now.

This class is currently meaningless, perhaps it should be carefully removed and the documentation for `priviledgedCallable` should be updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22119#discussion_r1843541695


More information about the core-libs-dev mailing list