From 0aa4dc91310ba40961f5f09009588881d708f17c Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 03 Jun 2016 14:32:11 +0000
Subject: [PATCH] OPENDJ-3037 Use SchemaBuilder.addSchema(Entry, boolean) in SchemaConfigManager

---
 opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java b/opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java
index f499920..0694161 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tasks/AddSchemaFileTask.java
@@ -62,13 +62,11 @@
   /** The list of files to be added to the server schema. */
   private TreeSet<String> filesToAdd;
 
-  /** {@inheritDoc} */
   @Override
   public LocalizableMessage getDisplayName() {
     return INFO_TASK_ADD_SCHEMA_FILE_NAME.get();
   }
 
-  /** {@inheritDoc} */
   @Override
   public void initializeTask()
          throws DirectoryException
@@ -87,7 +85,6 @@
       }
     }
 
-
     // Get the attribute that specifies which schema file(s) to add.
     Entry taskEntry = getTaskEntry();
     AttributeType attrType = DirectoryServer.getAttributeType(ATTR_TASK_ADDSCHEMAFILE_FILENAME);
@@ -99,7 +96,6 @@
       throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message);
     }
 
-
     // Get the name(s) of the schema files to add and make sure they exist in
     // the schema directory.
     String schemaInstanceDirectory =
@@ -136,7 +132,6 @@
       }
     }
 
-
     // Create a new dummy schema and make sure that we can add the contents of
     // all the schema files into it.  Even though this duplicates work we'll
     // have to do later, it will be good to do it now as well so we can reject
@@ -159,9 +154,6 @@
     }
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   protected TaskState runTask()
   {
@@ -182,7 +174,7 @@
       {
         try
         {
-          List<Modification> modList = SchemaConfigManager.loadSchemaFile(schema, schemaFile);
+          List<Modification> modList = SchemaConfigManager.loadSchemaFileReturnModifications(schema, schemaFile);
           for (Modification m : modList)
           {
             Attribute a = m.getAttribute();
@@ -234,4 +226,3 @@
     }
   }
 }
-

--
Gitblit v1.10.0