The lock in `tryAcquireLock(lock)` is not released in case of exceptions (detected by SonarCloud).
The lock in
tryAcquireLock(lock)is not released in case of exceptions (detected by SonarCloud).