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

Valery Kharseko
6 hours ago a0a2b0b1c7f49c5dd5a6f28f8b82ed425b4af2d4
Fix CodeQL note-severity alerts: confusing overloads with subtype parameters (#840)
2 files modified
46 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/extensions/AbstractPBKDF2PasswordStorageScheme.java 22 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java 24 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/AbstractPBKDF2PasswordStorageScheme.java
@@ -1,3 +1,18 @@
/*
 * The contents of this file are subject to the terms of the Common Development and
 * Distribution License (the License). You may not use this file except in compliance with the
 * License.
 *
 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
 * specific language governing permission and limitations under the License.
 *
 * When distributing Covered Software, include this CDDL Header Notice in each file and include
 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.extensions;
import org.forgerock.i18n.LocalizableMessage;
@@ -270,13 +285,6 @@
        }
    }
    private SecretKey encodeWithRandomSalt(ByteString plaintext, byte[] saltBytes, int iterations)
            throws DirectoryException
    {
        random.nextBytes(saltBytes);
        return encodeWithRandomSalt(plaintext, saltBytes, iterations);
    }
    private SecretKey encodeWithSalt(ByteSequence plaintext, byte[] saltBytes, int iterations)
            throws DirectoryException
    {
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -806,7 +806,7 @@
    }
    else
    {
      initializeWithArgParser(uData);
      initializeWithArgParserForSourceServer(uData);
      return initializeAllReplication(uData);
    }
  }
@@ -834,7 +834,7 @@
    }
    else
    {
      initializeWithArgParser(uData);
      initializeWithArgParserForSourceServer(uData);
      return preExternalInitialization(uData);
    }
  }
@@ -862,7 +862,7 @@
    }
    else
    {
      initializeWithArgParser(uData);
      initializeWithArgParserForSourceServer(uData);
      return postExternalInitialization(uData);
    }
  }
@@ -2674,7 +2674,7 @@
   */
  private boolean promptIfRequired(InitializeAllReplicationUserData uData)
  {
    ConnectionWrapper conn = getConnection(uData);
    ConnectionWrapper conn = getConnectionToSourceServer(uData);
    if (conn == null)
    {
      return false;
@@ -2736,7 +2736,7 @@
   */
  private boolean promptIfRequiredForPreOrPost(MonoServerReplicationUserData uData)
  {
    ConnectionWrapper conn = getConnection(uData);
    ConnectionWrapper conn = getConnectionToSourceServer(uData);
    if (conn == null)
    {
      return false;
@@ -2754,7 +2754,7 @@
    }
  }
  private ConnectionWrapper getConnection(MonoServerReplicationUserData uData)
  private ConnectionWrapper getConnectionToSourceServer(MonoServerReplicationUserData uData)
  {
    // Try to connect to the server.
    while (true)
@@ -2809,7 +2809,7 @@
   */
  private boolean promptIfRequired(StatusReplicationUserData uData) throws ReplicationCliException
  {
    ConnectionWrapper conn = getConnection(uData);
    ConnectionWrapper conn = getConnectionToSourceServer(uData);
    if (conn == null)
    {
      return false;
@@ -3105,11 +3105,15 @@
  }
  /**
   * Initializes the contents of the provided user data object with what was
   * provided in the command-line without prompting to the user.
   * Initializes the contents of the provided user data object of a subcommand which operates on a
   * single server with what was provided in the command-line without prompting to the user.
   * <p>
   * The subcommands which need more than the source server, or other arguments, have their own
   * overload taking their own user data type.
   *
   * @param uData the user data object to be initialized.
   */
  private void initializeWithArgParser(MonoServerReplicationUserData uData)
  private void initializeWithArgParserForSourceServer(MonoServerReplicationUserData uData)
  {
    initialize(uData);