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

[jira] Commented: (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=43349#action_43349 ] 

Claus Ibsen commented on CAMEL-595:
-----------------------------------

Dave thanks for all the findings. Is there other places in the code that have similiar issues with the read?, could be in some of the components as well.

However I haven't seen this kind of code to properly handling reading from an inputsource to a buffer not done with the just the one-liners in.read(buf) in other frameworks.
I don't think its well know that this problem could exists that the buffer isn't read in one operation.

Dave do you have experience that this has happened? eg reading a very large file etc?

> [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.