davsclaus opened a new pull request, #25969: URL: https://github.com/apache/camel/pull/25969
Backport to `camel-4.22.x` of #25967, a straight cherry-pick already reviewed and merged on `main`. - CAMEL-24573: camel-cxf - fix UnsupportedOperationException when copying a CXF JAXRS client factory bean from a Spring bean with a fixed-size `features` list (#25967, `98615a5d`) **Problem.** `CxfRsSpringEndpoint.newInstanceWithCommonProperties()` shallow-copies the `features` field from the source Spring bean. When that bean's `features` list is fixed-size (e.g. built with `Arrays.asList()`), the copy aliases the same immutable list. A later `addAll()` call in `setupCommonFactoryProperties()` then throws `UnsupportedOperationException`. **Fix.** Wrap the copied list in a new `ArrayList` so the copy is mutable, without touching the original Spring bean's list. Straight cherry-pick of the squash-merge commit, no manual adaptation needed. Built and tested `camel-cxf-spring-rest` on this branch, including the new `testCreateCxfRsClientFactoryBeanWithFixedSizeFeatures`. _Claude Code on behalf of davsclaus_ ## Backport of #25967 **Original PR:** #25967 - CAMEL-24573: CXF REST: UnsupportedOperationException when copying factory bean with fixed-size features list **Original author:** @mcarlett **Target branch:** `camel-4.22.x` -- 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]
