You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/07/22 08:31:15 UTC
[GitHub] [rocketmq] liuruiyiyang commented on a change in pull request #646:
simplify code
liuruiyiyang commented on a change in pull request #646: simplify code
URL: https://github.com/apache/rocketmq/pull/646#discussion_r305727557
##########
File path: broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java
##########
@@ -119,10 +119,8 @@ public RemotingCommand resetOffset(String topic, String group, long timeStamp, b
Map<MessageQueue, Long> offsetTable = new HashMap<MessageQueue, Long>();
for (int i = 0; i < topicConfig.getWriteQueueNums(); i++) {
- MessageQueue mq = new MessageQueue();
- mq.setBrokerName(this.brokerController.getBrokerConfig().getBrokerName());
- mq.setTopic(topic);
- mq.setQueueId(i);
+ String brokerName = this.brokerController.getBrokerConfig().getBrokerName();
Review comment:
This line could be outside the loop?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services