C0urante commented on code in PR #12789:
URL: https://github.com/apache/kafka/pull/12789#discussion_r1006589610


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -700,6 +707,9 @@ public ConnectorType connectorTypeForClass(String 
connClass) {
      * @return the {@link ConnectorType} of the connector
      */
     public ConnectorType connectorTypeForConfig(Map<String, String> 
connConfig) {

Review Comment:
   If we remove `connectorTypeForClass`, we can probably just rename this to 
`connectorType`.
   
   Also, the Javadoc states that `connConfig` may not be null. Are there cases 
where we anticipate that it will now be null? If so, we should update the 
Javadoc accordingly; if not, we should remove the null check.



##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -691,7 +691,14 @@ protected Connector getConnector(String connType) {
      * @param connClass class of the connector
      */
     public ConnectorType connectorTypeForClass(String connClass) {

Review Comment:
   Do we even need this separate method? It looks like it's only ever called in 
tests. Can we inline this logic into `connectorTypeForConfig` and tweak our 
tests to call that method instead?



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