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

   # Description
   
   Fixes [CAMEL-27446](https://issues.apache.org/jira/browse/CAMEL-27446).
   
   ## Summary
   
   No test set the cxfrs `providers` option in the endpoint URI. Its 
description named only bean ids separated by commas, though one List bean works 
too. No behavior changes.
   
   - `CxfRsEndpoint`: the `providers` description says that one bean that is a 
List of providers works too, for example `#myProviders`.
   - `CxfRsEndpointTest`: two new tests set `providers` in the endpoint URI, 
with the beans in the registry.
   
   ### Why one List bean works
   
   The review of #29725 dropped this form, as `CxfRsEndpoint` adds the List 
bean as one element of its providers. `AbstractJAXRSFactoryBean.setProviders` 
of CXF 4.2.4 then adds the elements of the List one by one. The tests get the 
endpoint from the CamelContext, as a route does. Without `init()`, a `new 
CxfRsComponent(context)` binds the options by reflection, not with the 
configurer.
   
   ## Tests
   
   - `testCxfRsEndpointProvidersBeanIds` uses `#jsonProvider,#xmlProvider`, and 
`testCxfRsEndpointProvidersListBean` uses `#myProviders`, a List bean of two 
providers.
   - Each checks that the server and client factory beans get exactly the two 
provider objects.
   - Both tests passed before the change too, as only the description changes.
   - The module tests of camel-cxf-rest ran 69 tests, and CamelCatalogTest ran 
156 tests, with no failure.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran `mvn clean install -Dquickly -DskipTests` in the root folder on 
the parent commit. Then I ran the builds of camel-cxf-rest, camel-catalog with 
CamelCatalogTest, camel-componentdsl and camel-endpointdsl, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of saravanakumar1987_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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