Github user lvfangmin commented on the issue:
https://github.com/apache/zookeeper/pull/590
@hanm the code complained by Findbug are all correct and expected:
1. System.exit if create watch manager failed in DataTree
It's using the factory to create the watch manager based on the class name,
in case we cannot initialize the class due to invalid classname, we have to
exit.
2. BitHashSet.elementCount not synchronized in iterator()
It cannot guarantee thread safe during iteration inside this function, so
it's marked as non thread safe in the comment, and the caller needs to and is
synchronizing it during iterating.
3. Synchronize on AtomicInteger
In the code, we synchronize on it to do wait/notify, but not relying on the
synchronization to control the AtomicInteger value update, so it's used
correctly.
---