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

Jean-Noël Rouvignac
04.15.2016 9d0cd2315ad10d4afce13c8865bd2e16a68b2b71
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ManageTasksPanel.java
@@ -51,11 +51,10 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.adapter.server3x.Converters;
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.LinkedAttribute;
import org.forgerock.opendj.ldap.LinkedHashMapEntry;
import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo;
import org.opends.guitools.controlpanel.datamodel.CustomSearchResult;
import org.opends.guitools.controlpanel.datamodel.ServerDescriptor;
import org.opends.guitools.controlpanel.datamodel.TaskTableModel;
import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent;
@@ -459,7 +458,7 @@
    int numberTasks = r.nextInt(10);
    for (int i= 0; i<numberTasks; i++)
    {
      CustomSearchResult csr = new CustomSearchResult(DN.valueOf("cn=mytask" + i + ",cn=tasks"));
      Entry csr = new LinkedHashMapEntry("cn=mytask" + i + ",cn=tasks");
      String p = "ds-task-";
      String[] attrNames =
      {
@@ -499,13 +498,12 @@
      {
        final LinkedAttribute attr = new LinkedAttribute(attrNames[j]);
        attr.add(values[j] + r.nextInt());
        Entry entry = csr.getSdkEntry();
        entry.removeAttribute(attr.getAttributeDescription());
        entry.addAttribute(attr);
        csr.removeAttribute(attr.getAttributeDescription());
        csr.addAttribute(attr);
      }
      try
      {
        list.add(new TaskEntry(Converters.to(csr.getSdkEntry())));
        list.add(new TaskEntry(Converters.to(csr)));
      }
      catch (Throwable t)
      {
@@ -525,7 +523,7 @@
    Set<TaskEntry> list = new HashSet<>();
    for (int i= 0; i<10; i++)
    {
      CustomSearchResult csr = new CustomSearchResult(DN.valueOf("cn=mytask" + i + ",cn=tasks"));
      Entry csr = new LinkedHashMapEntry("cn=mytask" + i + ",cn=tasks");
      String p = "ds-task-";
      String[] attrNames =
      {
@@ -565,13 +563,12 @@
      {
        final LinkedAttribute attr = new LinkedAttribute(attrNames[j]);
        attr.add(values[j]);
        Entry entry = csr.getSdkEntry();
        entry.removeAttribute(attr.getAttributeDescription());
        entry.addAttribute(attr);
        csr.removeAttribute(attr.getAttributeDescription());
        csr.addAttribute(attr);
      }
      try
      {
        list.add(new TaskEntry(Converters.to(csr.getSdkEntry())));
        list.add(new TaskEntry(Converters.to(csr)));
      }
      catch (Throwable t)
      {