You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jan Mothes (Jira)" <ji...@apache.org> on 2026/08/24 15:34:00 UTC

[jira] [Created] (CAMEL-24460) JSpecify: Make ProducerTemplate Body Parameters Nullable

Jan Mothes created CAMEL-24460:
----------------------------------

             Summary: JSpecify: Make ProducerTemplate Body Parameters Nullable
                 Key: CAMEL-24460
                 URL: https://issues.apache.org/jira/browse/CAMEL-24460
             Project: Camel
          Issue Type: Improvement
    Affects Versions: 4.21.0
            Reporter: Jan Mothes


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)