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 6FE879E87 for ; Sat, 21 Apr 2012 22:21:12 +0000 (UTC) Received: (qmail 75551 invoked by uid 500); 21 Apr 2012 22:21:12 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 75462 invoked by uid 500); 21 Apr 2012 22:21:11 -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 75455 invoked by uid 99); 21 Apr 2012 22:21:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 22:21:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2012 22:21:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D9C7A238899C; Sat, 21 Apr 2012 22:20:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1328741 - in /camel/branches/camel-2.9.x: ./ components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java Date: Sat, 21 Apr 2012 22:20:47 -0000 To: commits@camel.apache.org From: bibryam@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120421222047.D9C7A238899C@eris.apache.org> Author: bibryam Date: Sat Apr 21 22:20:47 2012 New Revision: 1328741 URL: http://svn.apache.org/viewvc?rev=1328741&view=rev Log: Merged revisions 1328722 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk ........ r1328722 | bibryam | 2012-04-21 19:42:08 +0100 (Sat, 21 Apr 2012) | 1 line When body is a WrappedFile, get the file from it ........ Modified: camel/branches/camel-2.9.x/ (props changed) camel/branches/camel-2.9.x/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Merged /camel/trunk:r1328722 Propchange: camel/branches/camel-2.9.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.9.x/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java?rev=1328741&r1=1328740&r2=1328741&view=diff ============================================================================== --- camel/branches/camel-2.9.x/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java (original) +++ camel/branches/camel-2.9.x/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java Sat Apr 21 22:20:47 2012 @@ -19,6 +19,7 @@ package org.apache.camel.component.solr; import java.io.File; import java.util.Map; import org.apache.camel.Exchange; +import org.apache.camel.WrappedFile; import org.apache.camel.impl.DefaultProducer; import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest; @@ -73,6 +74,9 @@ public class SolrProducer extends Defaul private void insert(Exchange exchange, boolean isStreaming) throws Exception { Object body = exchange.getIn().getBody(); + if (body instanceof WrappedFile) { + body = ((WrappedFile)body).getFile(); + } if (body instanceof File) {