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

abobrov
30.10.2009 165eb4e8aac72068def0ee3a53f48b1ec0b96c0d
- plug ConcurrentModificationException highlighted by nightly tests.
2 files modified
17 ■■■■ changed files
opends/src/server/org/opends/server/backends/task/TaskBackend.java 15 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/task/TaskScheduler.java 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.backends.task;
@@ -521,6 +521,10 @@
      return null;
    }
    Lock lock = taskScheduler.readLockEntry(entryDN);
    try
    {
    if (entryDN.equals(taskRootDN))
    {
      return taskScheduler.getTaskRootEntry();
@@ -550,11 +554,16 @@
    }
    else
    {
      // If we've gotten here then this is not an entry that should exist in the
      // task backend.
        // If we've gotten here then this is not an entry
        // that should exist in the task backend.
      return null;
    }
  }
    finally
    {
      taskScheduler.unlockEntry(entryDN, lock);
    }
  }
opends/src/server/org/opends/server/backends/task/TaskScheduler.java
@@ -139,7 +139,7 @@
  private LinkedList<TaskThread> idleThreads;
  // The lock used to provide threadsafe access to the scheduler.
  private ReentrantLock schedulerLock;
  private final ReentrantLock schedulerLock;
  // The task backend with which this scheduler is associated.
  private TaskBackend taskBackend;