Updated Branches: refs/heads/master 1da885090 -> bdf64e05c
Polished. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bdf64e05 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bdf64e05 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bdf64e05 Branch: refs/heads/master Commit: bdf64e05c8f5b045bb0cbee07a181a06bd516355 Parents: 1da8850 Author: Babak Vahdat <bvah...@apache.org> Authored: Sat Jun 1 19:38:40 2013 +0200 Committer: Babak Vahdat <bvah...@apache.org> Committed: Sat Jun 1 19:38:40 2013 +0200 ---------------------------------------------------------------------- .../camel/component/cache/CacheProducerTest.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/bdf64e05/components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheProducerTest.java ---------------------------------------------------------------------- diff --git a/components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheProducerTest.java b/components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheProducerTest.java index ed550a5..054079e 100755 --- a/components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheProducerTest.java +++ b/components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheProducerTest.java @@ -67,9 +67,12 @@ public class CacheProducerTest extends BaseCacheTest { public void process(Exchange exchange) throws Exception { // Set the property of the charset encoding exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8"); + + // Read in the file content using the exchange charset + byte[] fileContent = context.getTypeConverter().mandatoryConvertTo(byte[].class, exchange, new File(path)); + Message in = exchange.getIn(); - byte buffer[] = context.getTypeConverter().mandatoryConvertTo(byte[].class, new File(path)); - in.setBody(buffer); + in.setBody(fileContent); } }); }