8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

Reviewed-by: bpb, djelinski, vtewari
This commit is contained in:
Sorin Basca 2024-10-02 15:30:21 +00:00 committed by Liam Miller-Cushon
parent 5063494f5b
commit 9fc1c68442

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -957,6 +957,8 @@ class FileSystemPreferences extends AbstractPreferences {
try { try {
Thread.sleep(sleepTime); Thread.sleep(sleepTime);
} catch(InterruptedException e) { } catch(InterruptedException e) {
// Don't lose the interrupt.
Thread.currentThread().interrupt();
checkLockFile0ErrorCode(errorCode); checkLockFile0ErrorCode(errorCode);
return false; return false;
} }