RFR: 8344149: Remove usage of Security Manager from java.rmi
Stuart Marks
smarks at openjdk.org
Mon Nov 18 21:46:43 UTC 2024
On Mon, 18 Nov 2024 18:49:57 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> First cut at removal of Security Manager stuff from RMI.
>>
>> This covers just about every SM-related case in RMI, except for a bit of package checking in MarshalInputStream. This will be handled separately. It's covered by [JDK-8344329](https://bugs.openjdk.org/browse/JDK-8344329).
>>
>> Further simplifications could be done in RuntimeUtil and NewThreadAction. However, those changes started to become somewhat more intrusive than I'd like for this PR, which is focused on removing security-related stuff. EDIT: I've filed [JDK-8344461](https://bugs.openjdk.org/browse/JDK-8344461) to cover this additional cleanup work.
>
> src/java.rmi/share/classes/sun/rmi/runtime/NewThreadAction.java line 49:
>
>> 47: * @author Peter Jones
>> 48: **/
>> 49: public final class NewThreadAction {
>
> Suggest inlining the methods and getting rid of the class, moving non-trivial methods to an existing Util class.
> Or at least renaming it to to drop the "Action" that is indicative of doPrivileged.
Yes, further cleanup should be done here. I had started on it but I backed away since it felt like a distraction from the initial pass of removing direct SecurityManager and AccessController calls. I've filed [JDK-8344461](https://bugs.openjdk.org/browse/JDK-8344461) to cover the followup work.
> src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java line 404:
>
>> 402: */
>> 403: public void startNewAcceptor() {
>> 404: Thread t =
>
> Fold to previous line.
Can do.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22129#discussion_r1847316436
PR Review Comment: https://git.openjdk.org/jdk/pull/22129#discussion_r1847316561
More information about the core-libs-dev
mailing list