jsancio commented on a change in pull request #11200:
URL: https://github.com/apache/kafka/pull/11200#discussion_r687854292
##########
File path: core/src/main/scala/kafka/server/KafkaConfig.scala
##########
@@ -1905,6 +1905,13 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog:
Boolean, dynamicConfigO
@nowarn("cat=deprecation")
private def validateValues(): Unit = {
+ val nodeIdValue = values.get(KafkaConfig.NodeIdProp).asInstanceOf[Int]
+ if (nodeIdValue >= 0) {
+ val brokerIdValue =
values.get(KafkaConfig.BrokerIdProp).asInstanceOf[Int]
Review comment:
```suggestion
val nodeIdValue = getInt(KafkaConfig.NodeIdProp)
if (nodeIdValue >= 0) {
val brokerIdValue = getInt(KafkaConfig.BrokerIdProp)
```
For consistency, this type prefers to use `getInt` which does the casting.
--
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]