APIBuilder: Unlock RW-lock in remove()

The remove() function accidentally calls lock() in the finally
block, leaving the RW-lock unlocked.

Refs: scylladb/scylla#7991
(cherry picked from commit 59fd4d2b03)
This commit is contained in:
Pekka Enberg 2021-03-03 18:21:11 +02:00 committed by Avi Kivity
parent 47b355ec66
commit 0457674be2

View File

@ -172,7 +172,7 @@ public class APIBuilder extends MBeanServerBuilder {
logger.log(SEVERE, "Unexpected error.", x);
}
} finally {
lock.writeLock().lock();
lock.writeLock().unlock();
}
}
}