gnodet-bot commented on code in PR #28710:
URL: https://github.com/apache/camel/pull/28710#discussion_r4426382520


##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java:
##########
@@ -573,8 +589,19 @@ public Component getComponent(String name, boolean 
autoCreateComponents, boolean
                 // lets start it up.
                 final StartupStepRecorder startupStepRecorder = 
camelContextExtension.getStartupStepRecorder();
                 StartupStep step = 
startupStepRecorder.beginStep(Component.class, name, "Start Component");
-                startService(component);
+                startComponentCreatedOnFirstUse(name, component, 
startAlways.get());
                 startupStepRecorder.endStep(step);
+            } else if (autoStart && (isStarted() || isStarting() && 
componentsStarted) && isNotStartedYet(component)

Review Comment:
   💡 **Readability:** The condition relies on implicit `&&`-over-`||` 
precedence. Adding explicit parentheses around the `&&` sub-expression would 
make the intent immediately clear to future readers:
   
   ```suggestion
               } else if (autoStart && (isStarted() || (isStarting() && 
componentsStarted)) && isNotStartedYet(component)
   ```
   
   `&&` already binds tighter than `||` in Java, so the behavior is unchanged — 
this is purely a clarity improvement.



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