gnodet opened a new pull request, #25207:
URL: https://github.com/apache/camel/pull/25207

   _Claude Code on behalf of gnodet_
   
   ## Summary
   
   Removes the write-only `resumeInflightExchanges` field from 
`ThrottlingInflightRoutePolicy` that became dead code after the 
`ThrottlingLimits` holder refactoring in PR #24985 (CAMEL-24227).
   
   ## Problem
   
   After the holder refactoring, the standalone `resumeInflightExchanges` field 
was:
   - **Written** by `setMaxInflightExchanges()` and `setResumePercentOfMax()` 
setters
   - **Never read** — `throttle()` reads from the immutable `ThrottlingLimits` 
holder record instead
   - **No getter** exists, `toString()` doesn't reference it, JMX MBean doesn't 
expose it
   - The default `700` was duplicated between the field initializer and the 
holder constructor
   
   ## Changes
   
   - Remove the dead `resumeInflightExchanges` field (was line 81)
   - Remove the two dead writes (`this.resumeInflightExchanges = resume`) in 
the setter methods
   - Derive the initial holder default programmatically (`Math.max(70 * 1000 / 
100, 1)`) instead of duplicating the literal `700`
   
   Net: **−4 lines, +2 lines** in a single file.
   
   ## Test plan
   
   - [x] Existing `ThrottlingInflightRoutePolicyTest` passes
   - [x] Existing `ManagedThrottlingInflightRoutePolicyTest` passes
   - [x] `camel-support` module tests pass
   - [x] No other references to the removed field exist in the codebase 
(verified by grep)


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