You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Andrey Gura (JIRA)" <ji...@apache.org> on 2017/09/21 15:35:01 UTC
[jira] [Created] (IGNITE-6470) Wrong casting of long value to int
leads to incorrect results
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)