Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1289

FileCacheStore: skip unnecessary stream creation if file is empty

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            snazy0 Robert Stupp (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: