[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1289) FileCacheStore: skip unnecessary stream creation if file is empty

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Wed Aug 3 03:01:23 EDT 2011


     [ https://issues.jboss.org/browse/ISPN-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Galder Zamarreño updated ISPN-1289:
-----------------------------------

        Status: Resolved  (was: Pull Request Sent)
    Resolution: Done


> FileCacheStore: skip unnecessary stream creation if file is empty
> -----------------------------------------------------------------
>
>                 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
>            Priority: Minor
>             Fix For: 5.0.0.FINAL
>
>
> 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