TimeUnit is being used as the key to a map in TimeDiffUtil, so we must define a hashCode() consistent with its equals() method.
The implementation is the same as java.lang.Long.hashCode().
The code synchronizes on a boxed primitive constant, such as an Boolean.
Since there normally exist only two Boolean objects, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness and possible deadlock.
This commit uses the MutableBoolean class from commons-lang, which is included in bukkit.jar.