You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2015/03/19 15:39:39 UTC
[jira] [Created] (IGNITE-512) IgniteCache.randomEntry() is
implemented incorrectly.
Vladimir Ozerov created IGNITE-512:
--------------------------------------
Summary: IgniteCache.randomEntry() is implemented incorrectly.
Key: IGNITE-512
URL: https://issues.apache.org/jira/browse/IGNITE-512
Project: Ignite
Issue Type: Bug
Components: cache
Affects Versions: sprint-1
Reporter: Vladimir Ozerov
Fix For: sprint-2
1) It may return null if randomly picked entry is obsolete, which violates method semantics described in JavaDocs: it should return null ony in case cache is empty.
2) It may return not-null for empty cache. E.g., put several falues to it, then call removeAll(), then call randomEntry() - you may got value even after removal. Looks like "isObsolete" check is not enough.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)