davsclaus commented on code in PR #19892:
URL: https://github.com/apache/camel/pull/19892#discussion_r2529688600
##########
components/camel-ai/camel-docling/src/main/java/org/apache/camel/component/docling/DoclingProducer.java:
##########
@@ -710,6 +711,10 @@ private String getInputPath(Exchange exchange) throws
InvalidPayloadException, I
File file = (File) body;
validateFileSize(file.getAbsolutePath());
return file.getAbsolutePath();
+ } else if (body instanceof WrappedFile<?> wf) {
+ File file = (File) wf.getFile();
Review Comment:
You cannot type cast directly to File, as WrappedFile can also come from FTP
and then its another kind, or azure file that is also type etc. So you need to
do
Object f = wf.getFile
if (f instanceof File file) ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]