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

Ludovic Poitou
22.09.2011 94c29c40c5ac835fcfd3bd5274fb784b95106638
opends/src/server/org/opends/server/core/PasswordPolicyState.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.core;
@@ -1386,19 +1387,17 @@
      return;
    }
    long highestFailureTime = -1;
    for (Long l : authFailureTimes)
    {
      highestFailureTime = Math.max(l, highestFailureTime);
    }
    AttributeType type =
         DirectoryServer.getAttributeType(OP_ATTR_PWPOLICY_FAILURE_TIME_LC,
                                          true);
    this.authFailureTimes = authFailureTimes;
    AttributeBuilder builder = new AttributeBuilder(type);
    long highestFailureTime = -1;
    for (Long l : authFailureTimes)
    {
      highestFailureTime = Math.max(l, highestFailureTime);
      builder
          .add(AttributeValues.create(type, GeneralizedTimeSyntax.format(l)));
    }
@@ -2724,6 +2723,8 @@
    if (getRequiredChangeTime() != requiredChangeTime)
    {
      this.requiredChangeTime = requiredChangeTime;
      AttributeType type = DirectoryServer.getAttributeType(
                               OP_ATTR_PWPOLICY_CHANGED_BY_REQUIRED_TIME, true);
@@ -2757,6 +2758,8 @@
          userDNString);
    }
    this.requiredChangeTime = Long.MIN_VALUE;
    AttributeType type = DirectoryServer.getAttributeType(
                             OP_ATTR_PWPOLICY_CHANGED_BY_REQUIRED_TIME, true);
    if (updateEntry)
@@ -3077,6 +3080,8 @@
          userDNString);
    }
    this.graceLoginTimes = graceLoginTimes;
    AttributeType type =
         DirectoryServer.getAttributeType(OP_ATTR_PWPOLICY_GRACE_LOGIN_TIME_LC,
                                          true);