caigy commented on code in PR #5416:
URL: https://github.com/apache/rocketmq/pull/5416#discussion_r1008627063
##########
broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:
##########
@@ -303,9 +303,7 @@ private TopicConfig selectTopicConfig(String topic) {
public boolean writeOp(Integer queueId,Message message) {
MessageQueue opQueue;
- if (opQueueMap.containsKey(queueId)) {
- opQueue = opQueueMap.get(queueId);
- } else {
+ if ((opQueue = opQueueMap.get(queueId)) == null) {
Review Comment:
Assigning `opQueue` at first may be better than initializing it in `if`
condition.
--
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]