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

Ludovic Poitou
22.03.2010 887e246785056b972a725b5ef8457980325216fb
sdk/src/org/opends/sdk/responses/PasswordModifyExtendedResultImpl.java
@@ -43,7 +43,7 @@
 * Password modify extended result implementation.
 */
final class PasswordModifyExtendedResultImpl extends
    AbstractExtendedResult<PasswordModifyExtendedResult> implements
    AbstractExtendedResultImpl<PasswordModifyExtendedResult> implements
    PasswordModifyExtendedResult
{
  private ByteString password;
@@ -52,7 +52,8 @@
   * The ASN.1 element type that will be used to encode the genPasswd component
   * in a password modify extended response.
   */
  private static final byte TYPE_PASSWORD_MODIFY_GENERATED_PASSWORD = (byte) 0x80;
  private static final byte TYPE_PASSWORD_MODIFY_GENERATED_PASSWORD =
      (byte) 0x80;
@@ -65,6 +66,25 @@
  /**
   * Creates a new password modify extended result that is an exact copy of the
   * provided result.
   *
   * @param passwordModifyExtendedResult
   *          The password modify extended result to be copied.
   * @throws NullPointerException
   *           If {@code passwordModifyExtendedResult} was {@code null} .
   */
  PasswordModifyExtendedResultImpl(
      final PasswordModifyExtendedResult passwordModifyExtendedResult)
      throws NullPointerException
  {
    super(passwordModifyExtendedResult);
    this.password = passwordModifyExtendedResult.getGeneratedPassword();
  }
  /**
   * {@inheritDoc}
   */
  public ByteString getGeneratedPassword()
@@ -142,7 +162,7 @@
   * {@inheritDoc}
   */
  public PasswordModifyExtendedResult setGeneratedPassword(
      final ByteString password)
      final ByteString password) throws UnsupportedOperationException
  {
    this.password = password;
    return this;
@@ -153,7 +173,8 @@
  /**
   * {@inheritDoc}
   */
  public PasswordModifyExtendedResult setGeneratedPassword(final String password)
  public PasswordModifyExtendedResult setGeneratedPassword(
      final String password) throws UnsupportedOperationException
  {
    this.password = (password != null) ? ByteString.valueOf(password) : null;
    return this;