You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2008/06/09 21:35:00 UTC

[jira] Issue Comment Edited: (CAMEL-595) [patch] make sure file read code, reads fully

    [ https://issues.apache.org/activemq/browse/CAMEL-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43350#action_43350 ] 

dbrosius edited comment on CAMEL-595 at 6/9/08 12:34 PM:
-------------------------------------------------------------

It's not guaranteed by the InputStream contract. Some streams may greedy read, others may not. Large streams are a likely cause. For files, I believe it's up to each platform to decide how to manage this, so it might be that unix and win32 work perfectly fine, but perhaps some smaller platform does not. I didn't notice any other places in the code that has this problem. 

      was (Author: dbrosius):
    It's not guaranteed by the InputStream contract. Some streams may greedy read, others may not. Large streams are a likely cause. I believe it's up to each platform to decide how to manage this, so it might be that unix and win32 work perfectly fine, but perhaps some smaller platform does not. I didn't notice any other places in the code that has this problem. 
  
> [patch] make sure file read code, reads fully
> ---------------------------------------------
>
>                 Key: CAMEL-595
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-595
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.4.0
>
>         Attachments: read_fully.patch
>
>
> code uses in.read(buf) assuming that the read will be greedy. This isn't guaranteed, Patch fixes this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.