Skip to content

Commit 9fc1c68

Browse files
sbgoogcushon
authored andcommitted
8339850: Restore the interrupt status in FileSystemPreferences.lockFile()
Reviewed-by: bpb, djelinski, vtewari
1 parent 5063494 commit 9fc1c68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -957,6 +957,8 @@ private boolean lockFile(boolean shared) throws SecurityException{
957957
try {
958958
Thread.sleep(sleepTime);
959959
} catch(InterruptedException e) {
960+
// Don't lose the interrupt.
961+
Thread.currentThread().interrupt();
960962
checkLockFile0ErrorCode(errorCode);
961963
return false;
962964
}

0 commit comments

Comments
 (0)