com.intellij.util.containers.ContainerUtil



API Populatity

4 Client projects

Project: com.intellij

Project JetBrains/intellij-community in file ....src.git4idea.branch.GitDeleteBranchOperation.java (2013-12-06)
@@ -20,6 +20,7 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.Key;
 import com.intellij.util.ArrayUtil;
+import com.intellij.util.containers.ContainerUtil;
 import git4idea.GitCommit;
 import git4idea.GitPlatformFacade;
 import git4idea.GitVcs;
@@ -199,7 +200,7 @@ class GitDeleteBranchOperation extends GitBranchOperation {
         mergedToBranches = branches;
       } 
       else {
-        mergedToBranches.retainAll(branches);
+        mergedToBranches = new ArrayList<String>(ContainerUtil.intersection(mergedToBranches, branches));
       }
     }
     return mergedToBranches != null ? mergedToBranches : new ArrayList<String>();
Project JetBrains/intellij-community in file ...c.git4idea.ui.branch.GitMultiRootBranchConfig.java (2013-12-06)
@@ -15,6 +15,7 @@
  */
 package git4idea.ui.branch;
 
+import com.intellij.util.containers.ContainerUtil;
 import git4idea.GitBranch;
 import git4idea.GitLocalBranch;
 import git4idea.GitRemoteBranch;
@@ -120,7 +121,7 @@ public class GitMultiRootBranchConfig {
         trackingBranches = tb;
       }
       else {
-        trackingBranches.retainAll(tb);
+        trackingBranches = ContainerUtil.intersection(trackingBranches, tb);
       }
     }
     return trackingBranches == null ? Collections.<String>emptyList() : trackingBranches;
Project JetBrains/intellij-community in file ...com.intellij.debugger.engine.DebugProcessImpl.java (2013-03-04)
@@ -74,6 +74,7 @@ import com.intellij.util.Alarm;
 import com.intellij.util.EventDispatcher;
 import com.intellij.util.StringBuilderSpinAllocator;
 import com.intellij.util.concurrency.Semaphore;
+import com.intellij.util.containers.ContainerUtil;
 import com.sun.jdi.*;
 import com.sun.jdi.connect.*;
 import com.sun.jdi.request.EventRequest;
@@ -105,7 +106,7 @@ public abstract class DebugProcessImpl implements DebugProcess {
   protected EventDispatcher<DebugProcessListener> myDebugProcessDispatcher = EventDispatcher.create(DebugProcessListener.class);
   protected EventDispatcher<EvaluationListener> myEvaluationDispatcher = EventDispatcher.create(EvaluationListener.class);
 
-  private final List<ProcessListener> myProcessListeners = new ArrayList<ProcessListener>();
+  private final List<ProcessListener> myProcessListeners = ContainerUtil.createLockFreeCopyOnWriteList();
 
   protected static final int STATE_INITIAL   = 0;
   protected static final int STATE_ATTACHED  = 1;