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

RandomAccessFile mode "w" is not valid

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3, 4.2 Alpha1
    • Component/s: HttpCache
    • Labels:
    • Environment:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: