[ 
https://issues.apache.org/jira/browse/KAFKA-21669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai updated KAFKA-21669:
-----------------------------------
    Summary: Drop the dead version checks in CreateTopicsRequest  (was: Drop 
CreateTopicsRequest.Builder#build version check)

> Drop the dead version checks in CreateTopicsRequest
> ---------------------------------------------------
>
>                 Key: KAFKA-21669
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21669
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>
> The lowest version is v2, so the version == 0 and version() >= 2 checks are 
> redundant.
>  
> {code:java}
>             if (data.validateOnly() && version == 0)
>                 throw new UnsupportedProtocolFieldException("validateOnly", 
> apiKey().name(), version, 1);
>         if (version() >= 2) {
>             response.setThrottleTimeMs(throttleTimeMs);
>         }
> {code}
>  



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to