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

Jean-Noël Rouvignac
07.24.2016 18dc6866af53fb06efb0879f9c9c369e698d7379
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/ControlPanelInfo.java
@@ -17,6 +17,7 @@
package org.opends.guitools.controlpanel.datamodel;
import static org.opends.admin.ads.util.ConnectionUtils.*;
import static org.opends.admin.ads.util.PreferredConnection.Type.*;
import static org.opends.guitools.controlpanel.util.Utilities.*;
import static org.opends.server.tools.ConfigureWindowsService.*;
import static com.forgerock.opendj.cli.Utils.*;
@@ -463,20 +464,16 @@
        // Try with previous credentials.
        try
        {
          InitialLdapContext context = null;
          if (isLocal)
          {
            context = Utilities.getAdminDirContext(this, lastWorkingBindDN, lastWorkingBindPwd);
            connWrapper = Utilities.getAdminDirContext(this, lastWorkingBindDN, lastWorkingBindPwd);
          }
          else if (lastRemoteAdministrationURL != null)
          {
            context = createLdapsContext(lastRemoteAdministrationURL,
                lastWorkingBindDN,
                lastWorkingBindPwd,
                getConnectTimeout(), null,
                getTrustManager(), null);
            connWrapper = new ConnectionWrapper(
                lastRemoteAdministrationURL, LDAPS, lastWorkingBindDN, lastWorkingBindPwd,
                getConnectTimeout(), getTrustManager());
          }
          connWrapper = new ConnectionWrapper(context, getConnectTimeout(), getTrustManager());
        }
        catch (ConfigReadException | NamingException cre)
        {