gnodet-bot commented on code in PR #26618:
URL: https://github.com/apache/camel/pull/26618#discussion_r4055865613


##########
core/camel-api/src/main/java/org/apache/camel/InvalidPayloadException.java:
##########
@@ -53,6 +53,22 @@ public InvalidPayloadException(Exchange exchange, Class<?> 
type, Message message
         this.type = type;
     }
 
+    /**
+     * @param exchange the exchange that caused the error
+     * @param type     the expected body type
+     * @param message  the message with the invalid or missing payload
+     * @param hint     what to do about it, appended to the message
+     * @since          4.23
+     */
+    public InvalidPayloadException(Exchange exchange, Class<?> type, Message 
message, String hint) {

Review Comment:
   ⚠️ **Missing `@Nullable` on `hint` parameter.** The body checks `hint != 
null && !hint.isBlank()` so `null` is a valid and intentional value, but the 
signature doesn't say so. Callers and static-analysis tools have to guess. 
Since the file already imports `org.jspecify.annotations.Nullable`, add the 
annotation:
   
   ```suggestion
       public InvalidPayloadException(Exchange exchange, Class<?> type, Message 
message, @Nullable String hint) {
   ```



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