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


##########
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java:
##########
@@ -448,6 +450,42 @@ protected void doInit() throws Exception {
         ServiceHelper.initService(pluginRegistry);
     }
 
+    /**
+     * On a shared port the management endpoints are added to the main server, 
which keeps its own host, path, SSL and
+     * authentication. Fail instead of ignoring the management server settings 
it cannot apply.
+     */
+    private void checkSettingsApplyOnSharedServer(VertxPlatformHttpServer 
mainServer) {
+        List<String> ignored = new ArrayList<>();
+        String host = configuration.getBindHost();
+        if 
(!VertxPlatformHttpServerConfiguration.DEFAULT_BIND_HOST.equals(host)
+                && !Objects.equals(host, mainServer.getHost())) {
+            ignored.add("camel.management.host=" + host + " (the HTTP server 
binds to " + mainServer.getHost() + ")");
+        }
+        String path = configuration.getPath();
+        if (!VertxPlatformHttpServerConfiguration.DEFAULT_PATH.equals(path)
+                && !Objects.equals(path, mainServer.getPath())) {
+            ignored.add("camel.management.path=" + path + " (the HTTP server 
uses " + mainServer.getPath() + ")");
+        }
+        if (configuration.getSslContextParameters() != null) {
+            ignored.add("sslContextParameters");

Review Comment:
   💡 **Style:** The bare name `"sslContextParameters"` is inconsistent with 
every other entry in this list, which all include either a property key 
(`camel.management.xxx=value`) and/or an explanatory parenthetical. Consider 
adding context, e.g.:
   
   ```suggestion
               ignored.add("sslContextParameters (a custom SSL context cannot 
be applied to a shared HTTP server)");
   ```



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