Hi Babak

Thanks for the explanation and patch.

Do you mind opening creating a JIRA ticket and attach your patch. And
remember to [x] in grant license to Apache when attaching the file.
Otherwise we at Apache cannot accept your patch.
http://camel.apache.org/support


On Wed, Jul 20, 2011 at 4:49 PM, bvahdat <babak.vah...@swissonline.ch> wrote:
> Hi Claus,
>
> IMHO and with ALL my respect, I would never use the hard-coded
> unix-line-delimiter "\n", but would ALWAYS use the
> System.getProperty("line.separator"), so that I'm on the safe side no matter
> on which platform I'm running. That's "\r\n" on windows, "\n" on unix and
> "\r" on mac.
>
> The problem is that even when we say:
>
> fos.write(("Line " + i + "\n").getBytes());
>
> The file content on windows will be
>
> "Line " + i + "\r\n"
>
> Causing the assert to fail...
>
> You can verify it with a smart text-editor and search for the
> regular-expression "\r\n" on windows and you will hit it on ALL lines of
> 'slowfile.dat'. But please don't ask me why java.io.FileOutputStream behaves
> like that, to me it's strange.
>
> For any case I attach patch.txt of what I changed locally on the revision
> 1141471.
>
> http://camel.465427.n5.nabble.com/file/n4616161/diff.txt diff.txt
>
> Regards, Babak
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-8-0-tp4610671p4616161.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to