RFR: 8344799: Remove permissions checks from java.awt.Desktop
Alexander Zvegintsev
azvegint at openjdk.org
Thu Nov 21 23:44:14 UTC 2024
On Thu, 21 Nov 2024 22:21:47 GMT, Phil Race <prr at openjdk.org> wrote:
> Clean up permission checks in java.awt.Desktop class
> Also remove no longer needed exports from java.base to java.desktop
Marked as reviewed by azvegint (Reviewer).
src/java.desktop/share/classes/java/awt/Desktop.java line 409:
> 407: file = new File(file.getPath());
> 408: checkActionSupport(Action.EDIT);
> 409: file.canWrite();
Not related to this PR, but it looks like that the `file.canWrite();` check is useless here, as its result is ignored.
src/java.desktop/share/classes/java/awt/Desktop.java line 830:
> 828: * @since 9
> 829: */
> 830: @SuppressWarnings("removal")
Suggestion:
-------------
PR Review: https://git.openjdk.org/jdk/pull/22311#pullrequestreview-2452999003
PR Review Comment: https://git.openjdk.org/jdk/pull/22311#discussion_r1853079714
PR Review Comment: https://git.openjdk.org/jdk/pull/22311#discussion_r1853077344
More information about the core-libs-dev
mailing list