[infinispan-issues] [JBoss JIRA] (ISPN-4535) size() operator on JPACacheStore should expect larger than int

Tristan Tarrant (JIRA) issues at jboss.org
Thu Jan 22 03:23:49 EST 2015


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

Tristan Tarrant commented on ISPN-4535:
---------------------------------------

That's what the JDK does for Map:

public interface Map<K,V> {
    // Query Operations

    /**
     * Returns the number of key-value mappings in this map.  If the
     * map contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
     * <tt>Integer.MAX_VALUE</tt>.
     *
     * @return the number of key-value mappings in this map
     */
    int size();

> size() operator on JPACacheStore should expect larger than int
> --------------------------------------------------------------
>
>                 Key: ISPN-4535
>                 URL: https://issues.jboss.org/browse/ISPN-4535
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Loaders and Stores
>            Reporter: Sanne Grinovero
>
> the return type of the CacheStore#size() is int but it's common in databases to store way more.
> The query performing the count operation is doing a cast to integer, this will fail.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the infinispan-issues mailing list