Guillaume Nodet created CAMEL-24268:
---------------------------------------
Summary: 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
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)