[infinispan-issues] [JBoss JIRA] Created: (ISPN-1289) Improve FileCacheStore.loadBucket

Robert Stupp (JIRA) jira-events at lists.jboss.org
Tue Aug 2 07:08:23 EDT 2011


Improve FileCacheStore.loadBucket
---------------------------------

                 Key: ISPN-1289
                 URL: https://issues.jboss.org/browse/ISPN-1289
             Project: Infinispan
          Issue Type: Enhancement
          Components: Loaders and Stores
    Affects Versions: 5.0.0.CR8
            Reporter: Robert Stupp
            Assignee: Manik Surtani


The method FileCacheStore.loadBucket() does not need to call "new FileInputStream()", when the file is empty (length==0).
So it might be better to add the following lines before the call to "new FileInputStream(bucketFile)":

             // BEGIN: new stuff
             if (bucketFile.length()==0)
                 return null;
             // END: new stuff


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list