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

Copilot
16 hours ago 541fa7a7c68fcc344997ee11cf70575f36b530d8
opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java
@@ -13,6 +13,7 @@
 *
 * Copyright 2007-2010 Sun Microsystems, Inc.
 * Portions Copyright 2011-2016 ForgeRock AS.
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.tools.status;
@@ -246,14 +247,20 @@
      // LDAPConnectionConsoleInteraction, this done, it will not prompt
      // the user for them.
      controlInfo.setConnectionPolicy(ConnectionProtocolPolicy.USE_ADMIN);
      int port = controlInfo.getAdminConnectorHostPort().getPort();
      final SecureConnectionCliArgs secureArgsList = argParser.getSecureArgsList();
      final StringArgument hostNameArg = secureArgsList.getHostNameArg();
      hostNameArg.setPresent(true);
      hostNameArg.addValue(hostNameArg.getDefaultValue());
      if (!hostNameArg.isPresent())
      {
        hostNameArg.setPresent(true);
        hostNameArg.addValue(hostNameArg.getDefaultValue());
      }
      final IntegerArgument portArg = secureArgsList.getPortArg();
      portArg.setPresent(true);
      portArg.addValue(Integer.toString(port));
      if (!portArg.isPresent())
      {
        int port = controlInfo.getAdminConnectorHostPort().getPort();
        portArg.setPresent(true);
        portArg.addValue(Integer.toString(port));
      }
      // We already know if SSL or StartTLS can be used.  If we cannot
      // use them we will not propose them in the connection parameters
      // and if none of them can be used we will just not ask for the