Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-32

Improve concision - Reuse local variable 'brokerAddrs' in RouteInfoManager.getSystemTopicList method

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-incubating
    • Component/s: None
    • Labels:

      Description

      Tiny improvement to make code concise.
      Reuse local variable 'brokerAddrs' in RouteInfoManager.getSystemTopicList method.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user naughtybear commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/8

          @vongosling
          Hi,
          new JIRA Issue: https://issues.apache.org/jira/browse/ROCKETMQ-32

          Is that be Ok?

          Show
          githubbot ASF GitHub Bot added a comment - Github user naughtybear commented on the issue: https://github.com/apache/incubator-rocketmq/pull/8 @vongosling Hi, new JIRA Issue: https://issues.apache.org/jira/browse/ROCKETMQ-32 Is that be Ok?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/8

          It seems ok, thanks @naughtybear .

          Please @vongosling @lizhanhui help review it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/8 It seems ok, thanks @naughtybear . Please @vongosling @lizhanhui help review it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user naughtybear commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/8

          @vongosling @lizhanhui
          Please help review. Thanks.

          Show
          githubbot ASF GitHub Bot added a comment - Github user naughtybear commented on the issue: https://github.com/apache/incubator-rocketmq/pull/8 @vongosling @lizhanhui Please help review. Thanks.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/8

          alright

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/8 alright
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 12b6b9e64470e61591d2ec0dbdc49a74a056224c in incubator-rocketmq's branch refs/heads/master from yukon
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=12b6b9e ]

          ROCKETMQ-32 Reuse local variable brokerAddrs, thanks @naughtybear, closes apache/incubator-rocketmq#8

          Show
          jira-bot ASF subversion and git services added a comment - Commit 12b6b9e64470e61591d2ec0dbdc49a74a056224c in incubator-rocketmq's branch refs/heads/master from yukon [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=12b6b9e ] ROCKETMQ-32 Reuse local variable brokerAddrs, thanks @naughtybear, closes apache/incubator-rocketmq#8
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/8

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/8

            People

            • Assignee:
              vongosling vongosling
              Reporter:
              erichan hanzhaozhan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development