mayurbm commented on PR #25555:
URL: https://github.com/apache/camel/pull/25555#issuecomment-5440322538

   @davsclaus The CI failure is actually caused by this PR, not a flaky test. 
Here is the root cause:
   
   ** — ClassCastException / NPE**
   
   The new  guard in  returns  for non-XML content (correct behaviour, ). 
However  (in ) does not guard against a null result:
   
   ```java
   Document document = documentTc.convertTo(Document.class, exchange, value);
   return (T) documentToCxfPayload(document, exchange);  // NPE — document is 
null
   ```
   
   **Fix applied** in : skip  when the converter returns  and let the 
conversion fall through to the next candidate:
   
   ```java
   Document document = documentTc.convertTo(Document.class, exchange, value);
   if (document != null) {
       return (T) documentToCxfPayload(document, exchange);
   }
   ```
   
   This makes the pre-existing test  pass (it expects  for a non-XML byte 
array). The fix has been committed to the branch.


-- 
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]

Reply via email to