From ec6fcea7eb3b1013db8b26ff65327d3ab24077c9 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 09 Sep 2016 09:45:26 +0000
Subject: [PATCH] OPENDJ-3089 Several minor fixes from the PR

---
 opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java b/opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java
index 351111d..89a2677 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/schema/SchemaFilesWriter.java
@@ -130,10 +130,11 @@
       TreeSet<String> modifiedSchemaFiles, AlertGenerator alertGenerator)
           throws DirectoryException
   {
-    // We'll re-write all
-    // impacted schema files by first creating them in a temporary location
-    // and then replacing the existing schema files with the new versions.
-    // If all that goes successfully, then activate the new schema.
+    /*
+     * We'll re-write all impacted schema files by first creating them in a temporary location
+     * and then replacing the existing schema files with the new versions.
+     * If all that goes successfully, then activate the new schema.
+     */
     HashMap<String, File> tempSchemaFiles = new HashMap<>();
     try
     {
@@ -270,7 +271,10 @@
       File tempFile = new File(concatFilePath + ".tmp");
       try (BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile, false)))
       {
-        writeLines(writer, "dn: " + DirectoryServer.getSchemaDN(), "objectClass: top", "objectClass: ldapSubentry",
+        writeLines(writer,
+            "dn: " + DirectoryServer.getSchemaDN(),
+            "objectClass: top",
+            "objectClass: ldapSubentry",
             "objectClass: subschema");
 
         writeLines(writer, ATTR_ATTRIBUTE_TYPES, attributeTypes);
@@ -330,7 +334,7 @@
     TreeSet<File> schemaFiles = new TreeSet<>();
     String schemaDirectory = getSchemaDirectoryPath();
 
-    final FilenameFilter filter = new SchemaHandler.SchemaFileFilter();
+    final FilenameFilter filter = new SchemaUtils.SchemaFileFilter();
     for (File f : new File(schemaDirectory).listFiles(filter))
     {
       if (f.isFile())
@@ -541,9 +545,7 @@
   private File getUpgradeDirectory()
   {
     File configFile = serverContext.getEnvironment().getConfigFile();
-    File configDirectory = configFile.getParentFile();
-    File upgradeDirectory = new File(configDirectory, "upgrade");
-    return upgradeDirectory;
+    return new File(configFile.getParentFile(), "upgrade");
   }
 
   private File getConcatenatedSchemaFile() throws InitializationException

--
Gitblit v1.10.0