liqianggh opened a new pull request #2284:
URL: https://github.com/apache/rocketmq/pull/2284


   ## What is the purpose of the change
   spelling mistake  and code optimization
   
   ## Brief changelog
   
   1. change the method name from "getAvaliableChannel" to "getAvailableChannel"
   2. change the field name from "GET_AVALIABLE_CHANNEL_RETRY_COUNT" to 
"GET_AVAILABLE_CHANNEL_RETRY_COUNT"
   3. optimizing “getAvailableChannel” 
   `      List<Channel> channelList = new ArrayList<Channel>();
           ConcurrentHashMap<Channel, ClientChannelInfo> 
channelClientChannelInfoHashMap = groupChannelTable.get(groupId);
           if (channelClientChannelInfoHashMap != null) {
               for (Channel channel : channelClientChannelInfoHashMap.keySet()) 
{
                   channelList.add(channel);
               }
           } else {
               log.warn("Check transaction failed, channel table is empty. 
groupId={}", groupId);
               return null;
           }`
   
   with
   `     List<Channel> channelList;
           ConcurrentHashMap<Channel, ClientChannelInfo> 
channelClientChannelInfoHashMap = groupChannelTable.get(groupId);
           if (channelClientChannelInfoHashMap != null) {
               channelList = new 
ArrayList<>(channelClientChannelInfoHashMap.keySet());
           } else {
               log.warn("Check transaction failed, channel table is empty. 
groupId={}", groupId);
               return null;
           }`


----------------------------------------------------------------
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:
[email protected]


Reply via email to