You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/09/02 11:36:00 UTC
[jira] [Resolved] (CAMEL-24460) JSpecify: Make ProducerTemplate Body Parameters Nullable
[ https://issues.apache.org/jira/browse/CAMEL-24460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-24460.
---------------------------------
Resolution: Fixed
Fixed in main via https://github.com/apache/camel/pull/26032 (4.23.0), backport to camel-4.22.x in https://github.com/apache/camel/pull/26037 (4.22.1).
_Claude Code on behalf of davsclaus_
> JSpecify: Make ProducerTemplate Body Parameters Nullable
> --------------------------------------------------------
>
> Key: CAMEL-24460
> URL: https://issues.apache.org/jira/browse/CAMEL-24460
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 4.21.0
> Reporter: Jan Mothes
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.22.1, 4.23.0
>
>
> The "body" parameter in functions like "ProducerTemplate.requestBody" or "ProducerTemplate.sendBody" should be Nullable.
> Why:
> ProducerTemplate functions seem to want to stay very close to the general semantics of actual "internal" Camel Route Code, and inside Camel Routes body is generally treated as being nullable.
> We had to rewrite a bunch of test code that used null bodies, and it just seems like an unnecessary restriction to us.
> Unrelated side note:
> I'm curious why newExchange parameter in AggregationStrategy interface is Nullable when according to docs it can not be null (but that is not really related to this ticket).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)