mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
08.06.2015 b8c6b80da1cb6118167a934daa480eb381c59e0e
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/browser/NodeSearcherQueue.java
@@ -90,7 +90,10 @@
   * @param nodeTask the task to be added.
   */
  public synchronized void queue(AbstractNodeTask nodeTask) {
    if (nodeTask == null) throw new IllegalArgumentException("null argument");
    if (nodeTask == null)
    {
      throw new IllegalArgumentException("null argument");
    }
    waitingQueue.add(nodeTask);
    notify();
//    System.out.println("Queued " + nodeTask + " in " + _name);
@@ -106,7 +109,10 @@
   * @param node the node whose associated tasks must be cancelled.
   */
  public synchronized void cancelForNode(BasicNode node) {
    if (node == null) throw new IllegalArgumentException("null argument");
    if (node == null)
    {
      throw new IllegalArgumentException("null argument");
    }
    // Remove all the associated tasks from the waiting queue
    for (int i = waitingQueue.size()-1; i >= 0; i--) {
      AbstractNodeTask task = waitingQueue.get(i);
@@ -203,7 +209,10 @@
   * @param task the task to be flushed.
   */
  private synchronized void flush(AbstractNodeTask task) {
    if (task == null) throw new IllegalArgumentException("null argument");
    if (task == null)
    {
      throw new IllegalArgumentException("null argument");
    }
    workingList.remove(task.getNode());
    cancelList.remove(task.getNode());
    notify();