rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinrongt...@apache.org
Subject [rocketmq] branch develop updated: [ISSUE# 2325] Use CopyOnWriteArrayList to avoid possible thread safety issues
Date Wed, 07 Oct 2020 06:14:44 GMT
This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 77d24de  [ISSUE# 2325] Use CopyOnWriteArrayList to avoid possible thread safety issues
77d24de is described below

commit 77d24def3a5aafd0d10afd525734bba398cf48b2
Author: JasonWong <exceptionplayer@gmail.com>
AuthorDate: Wed Oct 7 14:12:29 2020 +0800

    [ISSUE# 2325] Use CopyOnWriteArrayList to avoid possible thread safety issues
---
 .../src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java b/broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java
index a237bf6..8b01ef5 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java
@@ -19,7 +19,6 @@ package org.apache.rocketmq.broker.out;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Vector;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
@@ -123,7 +122,7 @@ public class BrokerOuterAPI {
         final int timeoutMills,
         final boolean compressed) {
 
-        final List<RegisterBrokerResult> registerBrokerResultList = new Vector<>();
+        final List<RegisterBrokerResult> registerBrokerResultList = new CopyOnWriteArrayList<>();
         List<String> nameServerAddressList = this.remotingClient.getNameServerAddressList();
         if (nameServerAddressList != null && nameServerAddressList.size() > 0)
{
 


Mime
View raw message