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

matthew_swift
05.42.2009 22094368c2865dcfb6daf8366425212b721a4657
opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
@@ -43,12 +43,7 @@
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ByteString;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.ResultCode;
import org.opends.server.types.*;
import static org.opends.messages.SchemaMessages.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
@@ -273,12 +268,12 @@
   * @return  <CODE>true</CODE> if the provided value is acceptable for use with
   *          this syntax, or <CODE>false</CODE> if not.
   */
  public boolean valueIsAcceptable(ByteString value,
  public boolean valueIsAcceptable(ByteSequence value,
                                   MessageBuilder invalidReason)
  {
    // Get the value as a string and verify that it is at least long enough for
    // "YYYYMMDDhhmmZ", which is the shortest allowed value.
    String valueString = value.stringValue().toUpperCase();
    String valueString = value.toString().toUpperCase();
    int    length      = valueString.length();
    if (length < 11)
    {
@@ -846,8 +841,8 @@
      valueString = dateFormat.format(d);
    }
    return new AttributeValue(new ASN1OctetString(valueString),
                              new ASN1OctetString(valueString));
    return AttributeValues.create(ByteString.valueOf(valueString),
        ByteString.valueOf(valueString));
  }
@@ -868,7 +863,7 @@
  public static Date decodeUTCTimeValue(ByteString normalizedValue)
         throws DirectoryException
  {
    String valueString = normalizedValue.stringValue();
    String valueString = normalizedValue.toString();
    try
    {
      synchronized (dateFormatLock)