You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2026/07/31 09:12:00 UTC
[jira] [Resolved] (CAMEL-24268) ThrottlingInflightRoutePolicy: resumeInflightExchanges field is write-only after holder refactoring
[ https://issues.apache.org/jira/browse/CAMEL-24268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved CAMEL-24268.
-------------------------------------
Resolution: Fixed
Fixed in PR [#25207|https://github.com/apache/camel/pull/25207] (merged to main).
Removed the write-only resumeInflightExchanges field left behind by the ThrottlingLimits holder refactoring, and derived the initial holder default from the field values instead of duplicating literals.
> ThrottlingInflightRoutePolicy: resumeInflightExchanges field is write-only after holder refactoring
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24268
> URL: https://issues.apache.org/jira/browse/CAMEL-24268
> Project: Camel
> Issue Type: Task
> Components: camel-core
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
> Labels: good-first-issue
> Fix For: 4.22.0
>
>
> Found during review of PR #24985 (CAMEL-24227: volatile sweep for JMX-writable fields). After introducing the {{ThrottlingLimits}} immutable holder, the {{resumeInflightExchanges}} field became write-only.
> h3. Problem
> After the holder refactoring in PR #24985:
> # {{resumeInflightExchanges}} is written by the setters but never read directly — {{startConsumer()}} now takes it as a parameter from the holder snapshot
> # There is no getter for {{resumeInflightExchanges}}
> # {{toString()}} does not use it
> # The default value is duplicated between the field initializer and the literal {{new ThrottlingLimits(...)}} constructor call
> This is dead code / unnecessary state that should be cleaned up.
> h3. Suggested fix
> Remove the {{resumeInflightExchanges}} field entirely and derive the value only when constructing a new {{ThrottlingLimits}} holder. Remove the duplicated default.
> h3. References
> * PR [#24985|https://github.com/apache/camel/pull/24985] review comment by oscerd
> * {{core/camel-core-processor/src/main/java/org/apache/camel/processor/ThrottlingInflightRoutePolicy.java}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)