snehashisp commented on code in PR #17741:
URL: https://github.com/apache/kafka/pull/17741#discussion_r1871379169


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -661,25 +682,35 @@ ConfigInfos validateConnectorConfig(
             }
         }
         String connType = 
connectorProps.get(ConnectorConfig.CONNECTOR_CLASS_CONFIG);
+        VersionRange connVersion = null;
+        try {
+            connVersion = 
PluginVersionUtils.connectorVersionRequirement(connectorProps.get(CONNECTOR_VERSION));
+        } catch (Exception e) {
+            throw new BadRequestException(e.getMessage());
+        }
+
         if (connType == null)
             throw new BadRequestException("Connector config " + connectorProps 
+ " contains no connector type");
 
-        Connector connector = getConnector(connType);
-        ClassLoader connectorLoader = plugins().connectorLoader(connType);
+        Connector connector = getConnector(connType, connVersion);
+        ClassLoader connectorLoader = connector.getClass().getClassLoader();

Review Comment:
   I responded to that comment 
https://github.com/apache/kafka/pull/16984#discussion_r1871105860. Will make 
appropriate changes here once we conclude on that thread. 



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

Reply via email to