Croway opened a new pull request, #24808: URL: https://github.com/apache/camel/pull/24808
## Summary Backport of #24805 to `camel-4.18.x` (excludes the camel-plc4x test). - `AbstractCamelContext.doGetEndpoint()` normalizes the URI once for cache lookup, but on a cache miss passes the already-normalized URI to `addEndpointToRegistry()`, which normalizes it a **second** time. Since `EndpointHelper.normalizeEndpointUri()` is not idempotent for URIs containing `%` (each pass encodes `%41` → `%2541`), the stored registry key never matches a later lookup key — causing `getEndpoint()` to create a brand-new `Endpoint` on every call instead of reusing the cached singleton. - Adds a `normalized`-aware overload of `getEndpointKey()`/`addEndpointToRegistry()` so the `doGetEndpoint()` call site skips redundant re-normalization. Public APIs (`hasEndpoint`, `addEndpoint`, `removeEndpoints`) are unchanged. - Affects any component whose endpoint URI contains a literal `%` and is re-resolved by string (`pollEnrich`/`toD`/`recipientList`). ## Test plan - [x] New test `DefaultEndpointRegistryTest#testGetEndpointIsCachedForUriContainingPercentCharacter` verifies the fix using `controlbus:route?routeId=RAW(%41)&action=status`. _Claude Opus 4.6 on behalf of Croway_ -- 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]
