[infinispan-issues] [JBoss JIRA] (ISPN-2598) NullPointerException in case of passing customized FetchOptions to ClusteredQuery iterator() method

Anna Manukyan (JIRA) jira-events at lists.jboss.org
Thu Dec 6 08:52:18 EST 2012


Anna Manukyan created ISPN-2598:
-----------------------------------

             Summary: NullPointerException in case of passing customized FetchOptions to ClusteredQuery iterator() method
                 Key: ISPN-2598
                 URL: https://issues.jboss.org/browse/ISPN-2598
             Project: Infinispan
          Issue Type: Bug
          Components: Querying
            Reporter: Anna Manukyan
            Assignee: Sanne Grinovero


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:

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

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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list