oscerd commented on code in PR #28510:
URL: https://github.com/apache/camel/pull/28510#discussion_r4377367409


##########
components/camel-stripe/src/main/java/org/apache/camel/component/stripe/StripeProducer.java:
##########
@@ -43,11 +54,27 @@ public StripeEndpoint getEndpoint() {
     protected void doStart() throws Exception {
         super.doStart();
         StripeConfiguration config = getEndpoint().getConfiguration();
-        Stripe.apiKey = config.getApiKey();
+        RequestOptions.RequestOptionsBuilder builder = 
RequestOptions.builder();
+
+        if (ObjectHelper.isNotEmpty(config.getApiKey())) {
+            builder.setApiKey(config.getApiKey());
+        }

Review Comment:
   Agreed. Added validation in `doStart()` to throw an 
`IllegalArgumentException` if `apiKey` is not configured, preventing any silent 
fallback to global SDK state. Also added unit test coverage and updated the 
upgrade guide note.
   
   _Claude Code on behalf of oscerd_



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