mirror of https://github.com/apache/lucene.git
SOLR-14525: Test failure
This commit is contained in:
parent
e841d7625c
commit
552f1940af
|
@ -23,7 +23,7 @@ import java.lang.ref.SoftReference;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
import org.apache.solr.core.PluginInfo;
|
import org.apache.solr.core.PluginInfo;
|
||||||
import org.apache.solr.core.SolrCore;
|
import org.apache.solr.core.SolrCore;
|
||||||
import org.apache.solr.logging.MDCLoggingContext;
|
import org.apache.solr.logging.MDCLoggingContext;
|
||||||
|
@ -42,7 +42,7 @@ public class PackageListeners {
|
||||||
|
|
||||||
// this registry only keeps a weak reference because it does not want to
|
// this registry only keeps a weak reference because it does not want to
|
||||||
// cause a memory leak if the listener forgets to unregister itself
|
// cause a memory leak if the listener forgets to unregister itself
|
||||||
private List<Reference<Listener>> listeners = new ArrayList<>();
|
private List<Reference<Listener>> listeners = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
public synchronized void addListener(Listener listener) {
|
public synchronized void addListener(Listener listener) {
|
||||||
listeners.add(new SoftReference<>(listener));
|
listeners.add(new SoftReference<>(listener));
|
||||||
|
|
Loading…
Reference in New Issue