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

Jean-Noel Rouvignac
24.11.2015 8d21db36015f8560d9cd2bcee9817f2c0a07a386
opendj-server-legacy/src/test/java/org/opends/server/tasks/DummyTask.java
@@ -22,12 +22,10 @@
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.server.tasks;
import java.util.List;
import org.forgerock.i18n.LocalizableMessage;
@@ -38,8 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.Entry;
/**
 * This class provides an implementation of a Directory Server task always
 * completes successfully.  It is intended only for testing purposes.
@@ -47,24 +43,22 @@
public class DummyTask
       extends Task
{
  // The length of time that the task should sleep before completing.
  /** The length of time that the task should sleep before completing. */
  private long sleepTime;
  // The task state to use when interrupting the task.  This will be
  // null unless the task gets interrupted.
  /**
   * The task state to use when interrupting the task.  This will be
   * null unless the task gets interrupted.
   */
  private volatile TaskState interruptedState;
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public LocalizableMessage getDisplayName() {
    return LocalizableMessage.raw("Dummy");
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public void initializeTask()
         throws DirectoryException
@@ -92,9 +86,7 @@
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  protected TaskState runTask()
  {
    long stopTime = System.currentTimeMillis() + sleepTime;
@@ -119,9 +111,7 @@
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public boolean isInterruptable()
  {
@@ -130,9 +120,7 @@
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public void interruptTask(TaskState taskState, LocalizableMessage interruptMessage)
  {