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

Ludovic Poitou
30.27.2011 6c0c2eea3e22549589ad6ce4ab7cf71fcfc93969
Fix issue OPENDJ-171 - OpenDJ does not support a NULL ChangeLog Cookie value.
No brainer : If there's no value, create an empty MultiDomainServerState. The server already knows how to deal with them.
1 files modified
10 ■■■■ changed files
opends/src/server/org/opends/server/controls/ExternalChangelogRequestControl.java 10 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/controls/ExternalChangelogRequestControl.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions Copyright 2011 ForgeRock AS
 */
package org.opends.server.controls;
import static org.opends.messages.ProtocolMessages.*;
@@ -66,15 +67,13 @@
        ByteString value)
    throws DirectoryException
    {
      MultiDomainServerState mdss;
      if (value == null)
      {
        // FIXME:ECL In the request cookie, empty value is currently rejected.
        Message message = ERR_PSEARCH_NO_CONTROL_VALUE.get();
        throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message);
      }
        mdss = new MultiDomainServerState();
      } else {
      ASN1Reader reader = ASN1.getReader(value);
      MultiDomainServerState mdss;
      String mdssValue = null;
      try
      {
@@ -97,6 +96,7 @@
          throw new DirectoryException(ResultCode.PROTOCOL_ERROR, message, e);
        }
      }
      }
      return new ExternalChangelogRequestControl(isCritical, mdss);
    }