[infinispan-issues] [JBoss JIRA] (ISPN-4783) Using new ArrayList<>(resultCache.values())

Markus Vogt (JIRA) issues at jboss.org
Mon Sep 29 05:01:03 EDT 2014


     [ https://issues.jboss.org/browse/ISPN-4783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Vogt updated ISPN-4783:
------------------------------
    Steps to Reproduce: 
1. Put a value into a cache
1.1 cache.size() will return 1
2. use new ArrayList<>(cache.values())
2.1 arraylist.size() will return 2
2.2 2 items can be found in the list

  was:
1. Put a value into a cache
1.1 cache.size() will return 1
2. use new ArrayList<>(resultCache.values())
2.1 arraylist.size() will return 2
2.2 2 items can be found in the list



> Using new ArrayList<>(resultCache.values())
> -------------------------------------------
>
>                 Key: ISPN-4783
>                 URL: https://issues.jboss.org/browse/ISPN-4783
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 6.0.2.Final
>            Reporter: Markus Vogt
>            Assignee: Dan Berindei
>
> Hi,
> I am a little bit confused about the behaviour of getting the values from a cache and inserting into an ArrayList.
> I've putted one value into a cache, so that cache.size() is returning 1. If i now use 'new ArrayList<>(resultCache.values())', there will be two items in the list.
> By iterating over the cache, only one iteration will run... Where comes the second item from?
> Regards,
> Markus



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the infinispan-issues mailing list