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

Jean-Noël Rouvignac
03.26.2016 30370aa1fc4d363f07023059f330e9a1ec9f2313
opendj-server-legacy/src/main/java/org/opends/server/backends/task/Task.java
@@ -510,8 +510,7 @@
    try
    {
      this.taskState = taskState;
      Attribute attr = Attributes.create(ATTR_TASK_STATE, taskState.toString());
      taskEntry.putAttribute(attr.getAttributeType(), newArrayList(attr));
      putAttribute(ATTR_TASK_STATE, taskState.toString());
    }
    finally
    {
@@ -522,6 +521,12 @@
    }
  }
  private void putAttribute(String attrName, String attrValue)
  {
    Attribute attr = Attributes.create(attrName, attrValue);
    taskEntry.putAttribute(attr.getAttributeDescription().getAttributeType(), newArrayList(attr));
  }
  /**
   * Sets a state for this task that is the result of a call to
   * {@link #interruptTask(TaskState, LocalizableMessage)}.
@@ -651,9 +656,7 @@
    {
      this.actualStartTime = actualStartTime;
      Date d = new Date(actualStartTime);
      String startTimeStr = StaticUtils.formatDateTimeString(d);
      Attribute attr = Attributes.create(ATTR_TASK_ACTUAL_START_TIME, startTimeStr);
      taskEntry.putAttribute(attr.getAttributeType(), newArrayList(attr));
      putAttribute(ATTR_TASK_ACTUAL_START_TIME, StaticUtils.formatDateTimeString(d));
    }
    finally
    {
@@ -701,8 +704,7 @@
      SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_GMT_TIME);
      dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
      Date d = new Date(completionTime);
      Attribute attr = Attributes.create(ATTR_TASK_COMPLETION_TIME, dateFormat.format(d));
      taskEntry.putAttribute(attr.getAttributeType(), newArrayList(attr));
      putAttribute(ATTR_TASK_COMPLETION_TIME, dateFormat.format(d));
    }
    finally
    {