Andrey Gura created IGNITE-6470: ----------------------------------- Summary: Wrong casting of long value to int leads to incorrect results Key: IGNITE-6470 URL: https://issues.apache.org/jira/browse/IGNITE-6470 Project: Ignite Issue Type: Bug Affects Versions: 2.2 Reporter: Andrey Gura Assignee: Andrey Gura Fix For: 2.3
Wrong casting of long value to int leads to incorrect results: {code:java} /** {@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); } {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)