C0urante commented on code in PR #15149: URL: https://github.com/apache/kafka/pull/15149#discussion_r1446506255
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServer.java: ########## @@ -226,20 +235,20 @@ protected final void initializeResources() { if (adminListeners == null) { log.info("Adding admin resources to main listener"); adminResourceConfig = resourceConfig; - Collection<ConnectResource> adminResources = adminResources(); - resources.addAll(adminResources); + Collection<Class<?>> adminResources = adminResources(); adminResources.forEach(adminResourceConfig::register); configureAdminResources(adminResourceConfig); } else if (adminListeners.size() > 0) { // TODO: we need to check if these listeners are same as 'listeners' // TODO: the following code assumes that they are different log.info("Adding admin resources to admin listener"); adminResourceConfig = new ResourceConfig(); + adminResourceConfig.register(requestTimeout.binder()); adminResourceConfig.register(new JacksonJsonProvider()); - Collection<ConnectResource> adminResources = adminResources(); - resources.addAll(adminResources); + Collection<Class<?>> adminResources = adminResources(); adminResources.forEach(adminResourceConfig::register); adminResourceConfig.register(ConnectExceptionMapper.class); + adminResourceConfig.property(ServerProperties.WADL_FEATURE_DISABLE, true); Review Comment: Good call, done. I've also cleaned up the configuration of the `adminResourceConfig` to hopefully prevent other kinds of duplication-related issues in the future; LMKWYT -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org