Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2
-
None
-
None
Description
Wrong casting of long value to int leads to incorrect results:
/** {@inheritDoc} */ @Override public int pages() { if (!inited) return 0; // allocated.get() returns long value. We should cast it to int after division. return (int)((allocated.get() - headerSize()) / pageSize); }