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

Jean-Noël Rouvignac
01.24.2016 c38f72900e121badd214396309a318991940f01d
opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java
@@ -48,7 +48,6 @@
import static org.opends.messages.TaskMessages.*;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.DirectoryServer.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
@@ -187,26 +186,10 @@
          for (Modification m : modList)
          {
            Attribute a = m.getAttribute();
            AttributeType attrType = a.getAttributeDescription().getAttributeType();
            AttributeBuilder builder = new AttributeBuilder(attrType);
            AttributeBuilder builder = new AttributeBuilder(a.getAttributeDescription());
            for (ByteString v : a)
            {
              String s = v.toString();
              if (!s.contains(SCHEMA_PROPERTY_FILENAME))
              {
                if (s.endsWith(" )"))
                {
                 s = s.substring(0, s.length()-1) + SCHEMA_PROPERTY_FILENAME +
                     " '" + schemaFile + "' )";
                }
                else if (s.endsWith(")"))
                {
                 s = s.substring(0, s.length()-1) + " " +
                     SCHEMA_PROPERTY_FILENAME + " '" + schemaFile + "' )";
                }
              }
              builder.add(s);
              builder.add(Schema.addSchemaFileToElementDefinitionIfAbsent(v.toString(), schemaFile));
            }
            mods.add(new Modification(m.getModificationType(), builder.toAttribute()));