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

NullPointerException in case of passing customized FetchOptions to ClusteredQuery iterator() method

    XMLWordPrintable

Details

    Description

      While running tests for query module, I've found the following thing. I'm not sure whether this is a bug, but the same flow for CacheQueryImpl works in different way rather than for ClusteredCacheQueryImpl.

      I'm running the following command on already created ClusteredQuery:

      ResultIterator iterator = cacheQuery.iterator(new FetchOptions() {
               public FetchOptions fetchMode(FetchMode fetchMode) {
                  return null;
               }
            });
      

      This code throws NullPointerException, as the check of FetchMode is done in switch/case statement.

      The same code for CacheQuery throws IllegalArgumentException, as the check is done with if/else statement.

      Please find the test attached.

      Attachments

        Activity

          People

            anistor Adrian Nistor (Inactive)
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: