camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bibr...@apache.org
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 GMT
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) {
 



Mime
View raw message