View by Classes

Findings - Overview

info class uses non owned variables to synchronize on (Findbugs)

class org.jcoderz.commons.statistics.Average uses non owned variables to synchronize on

Further info on the wiki.

This method uses a synchronize block where the object that is being synchronized on, is not owned by this current instance. This means that other instances may use this same object for synchronization for its own purposes causing synchronization confusion. It is always cleaner and safer to only synchronize on private fields of this class. Note that 'this' is not owned by the current instance, but is owned by whomever assigns it to a field of its class. Synchronizing on 'this' is also not a good idea.

1org.jcoderz.commons.statistics.Average
 [83]