RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock. [v2]
Alan Bateman
alanb at openjdk.org
Sat Sep 9 08:42:40 UTC 2023
On Fri, 8 Sep 2023 18:45:02 GMT, Brent Christian <bchristi at openjdk.org> wrote:
> I would also like to see what a FileChannel implementation looks like. Am I right that this would allow the `prefs` native library to be removed entirely?
Yes. FileChannel.open can be called with the file permissions to atomically set when creating the lock file, and the 3-arg lock method can be used for both shared and exclusive locking. The usages of chmod would change to Files.setPosixFilePermissions. It should be quick to try to see if there are any issues.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15308#issuecomment-1712458404
More information about the core-libs-dev
mailing list