Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30D12F7FF for ; Sat, 1 Jun 2013 17:38:47 +0000 (UTC) Received: (qmail 12095 invoked by uid 500); 1 Jun 2013 17:38:46 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 12008 invoked by uid 500); 1 Jun 2013 17:38:46 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 11987 invoked by uid 99); 1 Jun 2013 17:38:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jun 2013 17:38:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0C31489F3C4; Sat, 1 Jun 2013 17:38:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bvahdat@apache.org To: commits@camel.apache.org Message-Id: <5bcfb3c373d1437391647bf35466e4e6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Polished. Date: Sat, 1 Jun 2013 17:38:45 +0000 (UTC) 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 Authored: Sat Jun 1 19:38:40 2013 +0200 Committer: Babak Vahdat 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); } }); }