RFR: 8343958: Remove security manager impl in java.lang.Process and java.lang.Runtime.exec [v3]
Brent Christian
bchristi at openjdk.org
Tue Nov 12 23:36:14 UTC 2024
On Tue, 12 Nov 2024 18:05:46 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Refactor removing the dependencies on SecurityManager, doPrivileged, and AccessController.
>
> Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 228 commits:
>
> - Merge branch 'master' into 8343958-process-sm-cleanup
> - correct exception message formatting
> - Simplify the generation of the exception message.
> The file path is always included in the exception, the IOException cause does not add useful information.
> - Remove security manager impl in java.lang.Process and java.lang.Runtime.exec
> Refactor to remove the dependencies on SecurityManager, doPrivileged, and AccessController.
> - 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
> - ... and 218 more: https://git.openjdk.org/jdk/compare/63eb4853...4535e388
Changes requested by bchristi (Reviewer).
src/java.base/share/classes/java/lang/ProcessHandleImpl.java line 242:
> 240: * @return The ProcessHandle for the pid if the process is alive;
> 241: * or {@code null} if the process ID does not exist in the native system.
> 242: * @throws SecurityException if RuntimePermission("manageProcess") is not granted
I believe this @throws is no longer needed.
src/java.base/share/classes/java/lang/ProcessHandleImpl.java line 278:
> 276: *
> 277: * @return The ProcessHandle for the OS process.
> 278: * @throws SecurityException if RuntimePermission("manageProcess") is not granted
Don't need this `@throws`
src/java.base/share/classes/java/lang/ProcessHandleImpl.java line 297:
> 295: * if the child process does not have a parent
> 296: * @throws SecurityException if permission is not granted by the
> 297: * security policy
Don't need the @throws
-------------
PR Review: https://git.openjdk.org/jdk/pull/22024#pullrequestreview-2430998748
PR Review Comment: https://git.openjdk.org/jdk/pull/22024#discussion_r1838952133
PR Review Comment: https://git.openjdk.org/jdk/pull/22024#discussion_r1838953880
PR Review Comment: https://git.openjdk.org/jdk/pull/22024#discussion_r1838954641
More information about the core-libs-dev
mailing list