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

Jean-Noël Rouvignac
25.15.2016 ba663b53d933130d2b6a68c1644e5744428dd1d6
opendj-server-legacy/src/main/java/org/opends/server/backends/task/Task.java
@@ -806,7 +806,7 @@
    // We cannot do task logging if the schema is either destroyed or
    // not initialized eg during in-core restart from Restart task.
    // Bailing out if there is no schema available saves us from NPE.
    if (getServerContext().getSchemaHandler() == null)
    if (serverContext.getSchemaHandler() == null)
    {
      return;
    }
@@ -823,7 +823,7 @@
      String messageString = buildLogMessage(severity, message, exception);
      logMessages.add(messageString);
      final AttributeType type = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_TASK_LOG_MESSAGES);
      final AttributeType type = serverContext.getSchema().getAttributeType(ATTR_TASK_LOG_MESSAGES);
      final Attribute attr = taskEntry.getAttribute(AttributeDescription.create(type));
      final AttributeBuilder builder = attr != null ? new AttributeBuilder(attr) : new AttributeBuilder(type);
      builder.add(messageString);