frankvicky opened a new pull request, #23070:
URL: https://github.com/apache/kafka/pull/23070

   Small review-follow-ups on top of the merged KIP-909 work (#21080, #22897):
   
   - **`BootstrapConfiguration.enabled(...)`**: wrap the host/port check with 
`try/catch IllegalArgumentException` so a malformed port (e.g. 
`host:99999999999999999999` that overflows `Integer.parseInt`) surfaces as 
`ConfigException("Invalid port in ...")`, matching the pre-existing behaviour 
in `ClientUtils.parseAndValidateAddresses`. Without this a 
`NumberFormatException` would leak out of client construction.
   
   - **`ClientUtils.parseAndValidateAddresses(AbstractConfig)`**: removed. This 
overload had no callers after the KIP-909 changes. The remaining two overloads 
(`(List<String>, String)` and `(List<String>, ClientDnsLookup)`) are still used 
by `BrokerApiVersionsCommand` and `ConnectionStressWorker`, which construct 
`NetworkClient` directly with `BootstrapConfiguration.DISABLED` and 
pre-resolved addresses.
   
   - **`CommonClientConfigs.BOOTSTRAP_RESOLVE_TIMEOUT_MS_DOC`**: reworded from 
"resolve for the bootstrap server address" to "resolve DNS for the bootstrap 
server address" for clarity.
   
   - **`KafkaProducerTest`**: replaced `new 
ConsumerGroupMetadata("test-group")` with `mock(ConsumerGroupMetadata.class)` + 
`when(...groupId()).thenReturn("test-group")` — the constructor is 
`@Deprecated(forRemoval)`.


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