You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Craig (Created) (JIRA)" <ji...@apache.org> on 2011/10/07 23:10:29 UTC

[jira] [Created] (HTTPCLIENT-1135) RandomAccessFile mode "w" is not valid

RandomAccessFile mode "w" is not valid
--------------------------------------

                 Key: HTTPCLIENT-1135
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1135
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: Cache
    Affects Versions: 4.1.2
         Environment: Android
            Reporter: Craig
            Priority: Critical


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCLIENT-1135) RandomAccessFile mode "w" is not valid

Posted by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1135.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2 Alpha1
                   4.1.3

Fixed in SVN trunk and 4.1.x branch.

Oleg
                
> RandomAccessFile mode "w" is not valid
> --------------------------------------
>
>                 Key: HTTPCLIENT-1135
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1135
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1.2
>         Environment: Android
>            Reporter: Craig
>              Labels: android
>             Fix For: 4.1.3, 4.2 Alpha1
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1135) RandomAccessFile mode "w" is not valid

Posted by "Oleg Kalnichevski (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1135:
------------------------------------------

    Priority: Major  (was: Critical)
    
> RandomAccessFile mode "w" is not valid
> --------------------------------------
>
>                 Key: HTTPCLIENT-1135
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1135
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1.2
>         Environment: Android
>            Reporter: Craig
>              Labels: android
>             Fix For: 4.1.3, 4.2 Alpha1
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1135) RandomAccessFile mode "w" is not valid

Posted by "Craig (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123203#comment-13123203 ] 

Craig commented on HTTPCLIENT-1135:
-----------------------------------

Javadoc indicating that "w" is not a supported mode: http://download.oracle.com/javase/6/docs/api/java/io/RandomAccessFile.html#mode
                
> RandomAccessFile mode "w" is not valid
> --------------------------------------
>
>                 Key: HTTPCLIENT-1135
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1135
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1.2
>         Environment: Android
>            Reporter: Craig
>            Priority: Critical
>              Labels: android
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org