mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 22:58:32 +01:00
For now, throw on cycles. Also remove checkNotLocked(), as it isn't actually the right thing to do.
This commit is contained in:
parent
c351df567e
commit
9bc9a4b262
1 changed files with 1 additions and 6 deletions
|
@ -31,7 +31,7 @@ public class Locks {
|
|||
// Default policy goes here. If you want to change this, use one of the static methods before
|
||||
// instantiating any bitcoinj objects. The policy change will take effect only on new objects
|
||||
// from that point onwards.
|
||||
warnOnLockCycles();
|
||||
throwOnLockCycles();
|
||||
}
|
||||
|
||||
private static CycleDetectingLockFactory.Policy policy;
|
||||
|
@ -61,9 +61,4 @@ public class Locks {
|
|||
public static CycleDetectingLockFactory.Policy getPolicy() {
|
||||
return policy;
|
||||
}
|
||||
|
||||
/** Equivalent to checkState(!lock.isLocked()) but the English description makes it harder to overlook the ! */
|
||||
public static void checkNotLocked(ReentrantLock lock) {
|
||||
checkState(!lock.isLocked());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue