FileOperations should expect body to be convertible to File
-----------------------------------------------------------
Key: CAMEL-3131
URL: https://issues.apache.org/activemq/browse/CAMEL-3131
Project: Apache Camel
Issue Type: Improvement
Components: camel-core
Reporter: Bruno Borges
The FileOperations class used by FileComponent and others related to file
management and processing, should expect that body message is convertible to a
File object.
In lines 170, the class tests the body to be either instance of File or
GenericFile, but some custom-user messages might have wrapped the File object
and written a Converter (our case).
I suggest to modify the referenced code to test if converted result for
File.class is not null than compare instanceof.
// is the body file based
File source = exchange.getIn().getBody(File.class);
// if (exchange.getIn().getBody(File.class) instanceof File ||
exchange.getIn().getBody() instanceof GenericFile) {
// source = exchange.getIn().getBody(File.class);
// }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.