[infinispan-issues] [JBoss JIRA] (ISPN-5653) keySet().iterator() does not propagate flags to remove()

RH Bugzilla Integration (JIRA) issues at jboss.org
Thu Aug 20 08:59:27 EDT 2015


    [ https://issues.jboss.org/browse/ISPN-5653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100225#comment-13100225 ] 

RH Bugzilla Integration commented on ISPN-5653:
-----------------------------------------------

Matej Čimbora <mcimbora at redhat.com> changed the Status of [bug 1252565|https://bugzilla.redhat.com/show_bug.cgi?id=1252565] from ON_QA to VERIFIED

> keySet().iterator() does not propagate flags to remove()
> --------------------------------------------------------
>
>                 Key: ISPN-5653
>                 URL: https://issues.jboss.org/browse/ISPN-5653
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 7.2.3.Final, 8.0.0.Beta2
>            Reporter: Radim Vansa
>            Assignee: William Burns
>             Fix For: 8.0.0.Beta3, 7.2.4.Final, 8.0.0.Final
>
>
> Calling {{remove()}} on iterator obtained through keySet() does not propagate flags from the original (decorated) cache. Test case (should go into BaseEntryRetrieverTest):
> {code}
>    @Test
>    public void simpleTestWithFlags() {
>       Map<Object, String> values = putValuesInCache();
>       final Cache<Object, Object> cache = cache(0, CACHE_NAME);
>       cache.getAdvancedCache().addInterceptor(new BaseCustomInterceptor() {
>          @Override
>          public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable {
>             assertTrue(command.hasFlag(Flag.SKIP_CACHE_STORE));
>             return super.visitRemoveCommand(ctx, command);
>          }
>       }, 0);
>       for (Iterator it = cache(0, CACHE_NAME).getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE).keySet().iterator(); it.hasNext();) {
>          assertTrue(values.containsKey(it.next()));
>          it.remove();
>       }
>    }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the infinispan-issues mailing list