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

Jean-Noël Rouvignac
03.17.2016 758fa048a39b3c362776400a9373ebeef86700af
opendj-server-legacy/src/main/java/org/opends/server/tools/makeldif/TemplateEntry.java
@@ -36,9 +36,14 @@
import java.util.List;
import org.forgerock.opendj.ldap.ByteString;
import org.opends.server.core.DirectoryServer;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.types.*;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeBuilder;
import org.opends.server.types.DN;
import org.opends.server.types.LDIFExportConfig;
import org.opends.server.types.ObjectClass;
import org.opends.server.types.RDN;
import org.opends.server.util.LDIFException;
/**
@@ -387,12 +392,13 @@
            continue;
          }
          StringBuilder attrName = attrNameWithOptions(a);
          String attrName = a.getNameWithOptions();
          if (typesOnly)
          {
            attrName.append(":");
            StringBuilder attrLine = new StringBuilder(attrName);
            attrLine.append(":");
            writeLDIFLine(attrName, writer, wrapLines, wrapColumn);
            writeLDIFLine(attrLine, writer, wrapLines, wrapColumn);
          }
          else
          {
@@ -430,12 +436,13 @@
              continue;
            }
            StringBuilder attrName = attrNameWithOptions(a);
            String attrName = a.getNameWithOptions();
            if (typesOnly)
            {
              attrName.append(":");
              StringBuilder attrLine = new StringBuilder(attrName);
              attrLine.append(":");
              writeLDIFLine(attrName, writer, wrapLines, wrapColumn);
              writeLDIFLine(attrLine, writer, wrapLines, wrapColumn);
            }
            else
            {
@@ -457,17 +464,6 @@
    return true;
  }
  private StringBuilder attrNameWithOptions(Attribute a)
  {
    StringBuilder attrName = new StringBuilder(a.getName());
    for (String o : a.getOptions())
    {
      attrName.append(";");
      attrName.append(o);
    }
    return attrName;
  }
  private boolean contains(List<Attribute> urlAttrList, ByteString v)
  {
    if (urlAttrList != null)