On Fri, 1 Sep 2023 12:36:28 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

>> We run into some BackingStoreException: Couldn't get file lock. e.g. here :
>> 
>> [JShell] Exception in thread "main" java.lang.IllegalStateException: 
>> java.util.prefs.BackingStoreException: Couldn't get file lock.
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder$PreferencesStorage.flush(JShellToolBuilder.java:313)
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellTool$ReplayableHistory.storeHistory(JShellTool.java:692)
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:1008)
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:261)
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
>> [JShell] Caused by: java.util.prefs.BackingStoreException: Couldn't get file 
>> lock.
>> [JShell] at 
>> java.prefs/java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:769)
>> [JShell] at 
>> java.prefs/java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:864)
>> [JShell] at 
>> jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder$PreferencesStorage.flush(JShellToolBuilder.java:311)
>> [JShell] ... 4 more
>> 
>> The BackingStoreException should be enhanced e.g. by adding the 
>> errno/errorCode that is already available in the coding
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   add for some errnos also the string

Hi Alan,
> If there are only a couple of errno's that occur for these cases, it might be 
> easier to hardwire the translation.
I just followed the idea suggested above to do the translation in the Java 
class itself . Do you have a good example where it is done by strerror and then 
passed back to Java , without much overhead?

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

PR Comment: https://git.openjdk.org/jdk/pull/15308#issuecomment-1702721259

Reply via email to