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

Claus Ibsen commented on CAMEL-8586:
------------------------------------

Its easier the github way. Just for this repo
https://github.com/apache/camel

And then create a branch to work on this patch
https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/

And then add and commit the code.
And then there should be a "create pull request" button.

Though its the standard github way.

Otherwise old fashioned .patch files is fine too

> File component optimization required for file response body
> -----------------------------------------------------------
>
>                 Key: CAMEL-8586
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8586
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.14.1
>            Reporter: Sergey Zolotaryov
>            Priority: Minor
>             Fix For: 2.16.0
>
>
> I have a producer which makes files (writes data to a temp file) and sets it 
> as output message body. I was expecting Camel file component to just rename 
> the resulting file. But instead it copies the file leaving the temporary file 
> intact. Here's a snippet from the FileOperations class which raised my 
> concern:
> {code}
>             // we can optimize and use file based if no charset must be used, 
> and the input body is a file
>             File source = null;
>             boolean fileBased = false;
>             if (charset == null) {
>                 // if no charset, then we can try using file directly 
> (optimized)
>                 Object body = exchange.getIn().getBody();
>                 if (body instanceof WrappedFile) {
>                     body = ((WrappedFile<?>) body).getFile();
>                     fileBased = true;
>                 }
>                 if (body instanceof File) {
>                     source = (File) body;
>                 }
>             }
>             if (fileBased) {
>                 // okay we know the body is a file based
> {code}
> So the fileBased is only assumed if we are using a proprietary WrappedFile 
> body, whereas normal file is not considered a fileBased body. Am I missing 
> something?
> We could just treat files the same way as WrappedFile, or have an endpoint 
> option to treat them as such, what do you think?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to