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

Jean-Noel Rouvignac
09.01.2015 5cd7bdbbda0fa9f1aa6e12d9171c3811b73feb07
opendj-server-legacy/src/main/java/org/opends/server/plugins/EntryUUIDPlugin.java
@@ -28,7 +28,6 @@
import static org.opends.messages.PluginMessages.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -167,12 +166,9 @@
    byte[] dnBytes = entry.getName().toNormalizedByteString().toByteArray();
    UUID uuid = UUID.nameUUIDFromBytes(dnBytes);
    Attribute uuidAttr = Attributes.create(entryUUIDType, uuid.toString());
    uuidList = new ArrayList<>(1);
    uuidList.add(uuidAttr);
    uuidList = Attributes.createAsList(entryUUIDType, uuid.toString());
    entry.putAttribute(entryUUIDType, uuidList);
    // We shouldn't ever need to return a non-success result.
    return PluginResult.ImportLDIF.continueEntryProcessing();
  }
@@ -198,10 +194,7 @@
    // Construct a new random UUID.
    UUID uuid = UUID.randomUUID();
    Attribute uuidAttr = Attributes.create(entryUUIDType, uuid.toString());
    uuidList = new ArrayList<>(1);
    uuidList.add(uuidAttr);
    uuidList = Attributes.createAsList(entryUUIDType, uuid.toString());
    // Add the attribute to the entry and return.
    addOperation.setAttribute(entryUUIDType, uuidList);