Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4837

@CacheEntryActivated events received for keys not matching KeyFilter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.0.0.CR2
    • 7.0.0.CR1
    • Listeners
    • None

    Description

      I have a local-mode Cache<Object, ?>, for which I register a cache listener using the following KeyFilter:

      class MyFIlter implements KeyFilter<Object> {
          @Override
          public boolean accept(Object key) {
              return key instanceof String;
          }
      }
      

      However, my listener method still receives events for keys that does not match the filter with which my listener was registered.
      e.g.

          @CacheEntryActivated
          public void activated(CacheEntryActivatedEvent<String, ?> event) {
              String id = event.getKey();  // Throws a ClassCastException
              // ...
          }
      

      I have not validated which other event types might exhibit the same issue.
      Since this is a behavior regression, I'm filing this as critical.

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: