Description
The class LeaderLatch has two methods `close`, one of them accepts argument `CloseMode`. If the argument is null (unlikely but still possible) the instance changes the state to CLOSED but does not really close anything because throws a runtime exception `closeMode cannot be null` right after changing the status.
The quickest fix is to just swap preconditions checks. The more correct solution is to change state in the try block after the client removed all watchers (or in finally block). It should not break anything because the method is synchronized.
Attachments
Issue Links
- links to