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

neil_a_wilson
19.57.2007 dd0aa3d6f2295686b10d2e11c972687a225c103f
opends/src/server/org/opends/server/core/SchemaConfigManager.java
@@ -646,8 +646,10 @@
    // Construct the path to the directory that should contain the schema files
    // and make sure that it exists and is a directory.  Get a list of the files
    // in that directory sorted in alphabetic order.
    String schemaDirPath = getSchemaDirectoryPath();
    File schemaDir = new File(schemaDirPath);
    String schemaDirPath          = getSchemaDirectoryPath();
    File schemaDir                = new File(schemaDirPath);
    long oldestModificationTime   = -1L;
    long youngestModificationTime = -1L;
    String[] fileNames;
    try
@@ -673,6 +675,19 @@
        {
          fileList.add(f.getAbsolutePath());
        }
        long modificationTime = f.lastModified();
        if ((oldestModificationTime <= 0L) ||
            (modificationTime < oldestModificationTime))
        {
          oldestModificationTime = modificationTime;
        }
        if ((youngestModificationTime <= 0) ||
            (modificationTime > youngestModificationTime))
        {
          youngestModificationTime = modificationTime;
        }
      }
      fileNames = new String[fileList.size()];
@@ -696,6 +711,22 @@
    }
    // If the oldest and youngest modification timestamps didn't get set for
    // some reason, then set them to the current time.
    if (oldestModificationTime <= 0)
    {
      oldestModificationTime = System.currentTimeMillis();
    }
    if (youngestModificationTime <= 0)
    {
      youngestModificationTime = oldestModificationTime;
    }
    schema.setOldestModificationTime(oldestModificationTime);
    schema.setYoungestModificationTime(youngestModificationTime);
    // Iterate through the schema files and read them as an LDIF file containing
    // a single entry.  Then get the attributeTypes and objectClasses attributes
    // from that entry and parse them to initialize the server schema.