Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1135

RandomAccessFile mode "w" is not valid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3, 4.2 Alpha1
    • HttpCache
    • Android

    Description

      According to the Java docs for RandomAccessFile, mode must be "r" "rw" "rws" or "rwd" - anything else results in an IllegalArgumentException. It seems that Sun/Oracle/OpenJDK's don't document it, but supports "w" mode that is equivalent to "rw" Android does as the Javadocs say, and throws an IllegalArgumentException when mode "w" is passed as HttpClientCache does IOUtils.copyFile() (line 70-71).

      This means that HttpClient Cache does not work on Android.

      Attachments

        Activity

          People

            Unassigned Unassigned
            candrews Craig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: