RFR: 8335267: [XWayland] move screencast tokens from .awt to .java folder

Alexey Ushakov avu at openjdk.org
Thu Jul 25 15:07:44 UTC 2024


On Thu, 18 Jul 2024 14:08:35 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

> Trivial fix to move the screencast token storage file from `~/.awt/robot/screencast-tokens.properties` to `~/.java/robot/screencast-tokens.properties`, where it should be.
> Old location is still valid and will only be used if there is a file in the old location and the new location does not have it.
> 
> Along with the fix  `@SuppressWarnings("removal")` is moved to individual items as it was done in [JFX](https://github.com/openjdk/jfx/pull/1490).

Changes requested by avu (Committer).

src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java line 113:

> 111:         Path secondaryPath = Path.of(userHome, REL_NAME_SECONDARY);
> 112: 
> 113:         Path path = Files.isWritable(secondaryPath) && !Files.isWritable(primaryPath)

isWritable() returns false for both paths if it's the very first run with a particular home directory.

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

PR Review: https://git.openjdk.org/jdk/pull/20234#pullrequestreview-2199521946
PR Review Comment: https://git.openjdk.org/jdk/pull/20234#discussion_r1691578373


More information about the client-libs-dev mailing list