Skip to content

Commit f4e00e9

Browse files
authored
MINOR: Remove unnecessary check in ReplicaManager (#20588)
`setTopics` is executed at before, so the check is unnecessary. Reviewers: Ken Huang <[email protected]>, Chia-Ping Tsai <[email protected]>
1 parent 97c8c6b commit f4e00e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/scala/kafka/server/ReplicaManager.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,11 +1261,11 @@ class ReplicaManager(val config: KafkaConfig,
12611261
}
12621262

12631263
val describeLogDirsResult = new DescribeLogDirsResponseData.DescribeLogDirsResult()
1264-
.setLogDir(absolutePath).setTopics(topicInfos)
1264+
.setLogDir(absolutePath)
1265+
.setTopics(topicInfos)
12651266
.setErrorCode(Errors.NONE.code)
1266-
.setTotalBytes(totalBytes).setUsableBytes(usableBytes)
1267-
if (!topicInfos.isEmpty)
1268-
describeLogDirsResult.setTopics(topicInfos)
1267+
.setTotalBytes(totalBytes)
1268+
.setUsableBytes(usableBytes)
12691269
describeLogDirsResult
12701270

12711271
} catch {

0 commit comments

Comments
 (0)