gnodet commented on code in PR #23304:
URL: https://github.com/apache/camel/pull/23304#discussion_r3264214014
##########
core/camel-api/src/main/java/org/apache/camel/CamelExchangeException.java:
##########
@@ -42,7 +42,7 @@ public CamelExchangeException(String message, @Nullable
Exchange exchange) {
* @param exchange the exchange that caused the error
* @param cause the cause of the failure
*/
- public CamelExchangeException(String message, @Nullable Exchange exchange,
Throwable cause) {
+ public CamelExchangeException(@Nullable String message, @Nullable Exchange
exchange, Throwable cause) {
Review Comment:
Good point — added `@Nullable` on `Throwable cause` too (both
`CamelExchangeException` and `ValidationException`). Java's `Exception(String,
Throwable)` and `createExceptionMessage()` both handle null cause correctly,
and it avoids forcing callers to branch on whether cause is null to pick the
right constructor.
_Claude Code on behalf of Guillaume Nodet_
--
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]