The jvm doesn't guarantee anything about ++ operations; they are *not*
single commands. This is even more of a problem with 64 bit longs on a
32 bit jvm, where even a read or a write to/from a long may be multiple
commands. It is entirely possible that a write to a long might be
partially read by another thread.
The fix is either to protected all the stats with a synchronized block,
either a single one, or one per stat, or to use the new java 1.5 atomic
variables. The latter is much better, because most of the time no one
is reading the stats, so there is hardly ever any contention.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884984 13f79535-47bb-0310-9956-ffa450edef68