RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.
Matthias Baesken
mbaesken at openjdk.org
Wed Aug 23 12:49:21 UTC 2023
On Fri, 18 Aug 2023 12:35:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>No, I don't think the legacy prefs API being coupled to internals like this. Instead I think this is case where the prefs natives >will need to use strerror.
Hi Alan, should this be done similar to what is done here , using strerror + strdup and throwing an exception with the generated error message ?
https://github.com/openjdk/jdk/blob/master/src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c#L105
Does not look very nice to me, but would probably work.
It is really a bit frustrating that we have already in the OpenJDK codebase 2 solutions (HS runtime/os.cpp and nio UnixConstants ) but none are really usable in other parts of the coding. Looks like a bad duplication (or worse) of efforts.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15308#issuecomment-1689900122
More information about the core-libs-dev
mailing list