Skip to content

Commit eae20da

Browse files
committed
use regular reentrant lock (it is already exclusive)
1 parent 8066bc5 commit eae20da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/cryptomator/linux/quickaccess/DolphinPlaces.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.UUID;
2424
import java.util.concurrent.TimeUnit;
2525
import java.util.concurrent.locks.Lock;
26-
import java.util.concurrent.locks.ReentrantReadWriteLock;
26+
import java.util.concurrent.locks.ReentrantLock;
2727

2828
/**
2929
* Implemenation of the {@link QuickAccessService} for KDE desktop environments using Dolphin file browser.
@@ -36,7 +36,7 @@ public class DolphinPlaces implements QuickAccessService {
3636
private static final int MAX_FILE_SIZE = 1 << 15; //xml is quite verbose
3737
private static final Path PLACES_FILE = Path.of(System.getProperty("user.home"), ".local/share/user-places.xbel");
3838
private static final Path TMP_FILE = PLACES_FILE.resolveSibling("user-places.xbel.cryptomator.tmp");
39-
private static final Lock MODIFY_LOCK = new ReentrantReadWriteLock().writeLock();
39+
private static final Lock MODIFY_LOCK = new ReentrantLock();
4040
private static final String ENTRY_TEMPLATE = """
4141
<bookmark href="%s">
4242
<title>%s</title>

0 commit comments

Comments
 (0)