- final boolean lockedMatch = LOCKED_UPDATER.compareAndSet(this, tx, null);
- verify(lockedMatch, "Cancelling transaction %s collided with locked transaction %s", tx, lockedTx);
+ if (!LOCKED_UPDATER.compareAndSet(this, tx, null)) {
+ throw new VerifyException(String.format("Cancelling transaction %s collided with locked transaction %s", tx,
+ lockedTx));
+ }