quantranhong1999 commented on code in PR #2399:
URL: https://github.com/apache/james-project/pull/2399#discussion_r1744805902


##########
server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/routes/HealthCheckRoutes.java:
##########
@@ -56,15 +63,17 @@ public class HealthCheckRoutes implements PublicRoutes {
 
     public static final String HEALTHCHECK = "/healthcheck";
     public static final String CHECKS = "/checks";
-    
+
     private static final String PARAM_COMPONENT_NAME = "componentName";
+    private static final String QUERY_PARAM_COMPONENT_NAMES = "checks";
 
     private final JsonTransformer jsonTransformer;
-    private final Set<HealthCheck> healthChecks;
+    private final Map<ComponentName, HealthCheck> healthCheckMap;

Review Comment:
   How about keep using `Set<HealthCheck> healthChecks;`. We still can filter 
valid component names because the `HealthCheck` has `ComponentName` in itself. 
And remove the ugly and cheating reflection below.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to