[
https://issues.apache.org/jira/browse/ROCKETMQ-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823380#comment-15823380
]
ASF GitHub Bot commented on ROCKETMQ-32:
----------------------------------------
Github user vongosling commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/8#discussion_r96157627
--- Diff:
rocketmq-namesrv/src/main/java/com/alibaba/rocketmq/namesrv/routeinfo/RouteInfoManager.java
---
@@ -622,7 +622,7 @@ public void printAllPeriodically() {
while (it.hasNext()) {
BrokerData bd = brokerAddrTable.get(it.next());
HashMap<Long, String> brokerAddrs =
bd.getBrokerAddrs();
- if (bd.getBrokerAddrs() != null &&
!bd.getBrokerAddrs().isEmpty()) {
--- End diff --
code smell
> Improve concision - Reuse local variable 'brokerAddrs' in
> RouteInfoManager.getSystemTopicList method
> ----------------------------------------------------------------------------------------------------
>
> Key: ROCKETMQ-32
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-32
> Project: Apache RocketMQ
> Issue Type: Improvement
> Reporter: hanzhaozhan
> Assignee: vongosling
> Priority: Trivial
> Labels: concision
>
> Tiny improvement to make code concise.
> Reuse local variable 'brokerAddrs' in RouteInfoManager.getSystemTopicList
> method.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)