[infinispan-issues] [JBoss JIRA] (ISPN-2598) NullPointerException in case of passing customized FetchOptions to ClusteredQuery iterator() method
Adrian Nistor (JIRA)
jira-events at lists.jboss.org
Mon Sep 30 14:15:03 EDT 2013
[ https://issues.jboss.org/browse/ISPN-2598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12808347#comment-12808347 ]
Adrian Nistor commented on ISPN-2598:
-------------------------------------
FetchMode cannot be null and this is already ensured by the FetchOptions constructor and method FetchOptions.fetchMode(...). Overriding method fetchMode to circumvent this is not legal, so why should we expect consistent results?
> 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: Adrian Nistor
> Labels: clustered_queries
> Fix For: 6.0.0.CR1
>
> Attachments: ClusteredQueryTest.java
>
>
> 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