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

jvergara
08.05.2010 c7c3b114dddcc2421b8c700ee152f35c3257a28b
Fix for issue 4471 (Default upgrade path in Webstart upgrader is not correct)
Calculate the path instead of using the one provided by the installer.
1 files modified
14 ■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/installandupgrader/ui/WelcomePanel.java 14 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installandupgrader/ui/WelcomePanel.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008-2009 Sun Microsystems, Inc.
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 */
package org.opends.quicksetup.installandupgrader.ui;
@@ -44,6 +44,7 @@
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
/**
 * This panel is used to show a welcome message asking the user whether to
@@ -83,7 +84,16 @@
    super.beginDisplay(data);
    if (!initialized)
    {
      tcServerLocation.setText(data.getServerLocation());
      String userDir = System.getProperty("user.home");
      String firstLocation =
        userDir + File.separator
        + org.opends.server.util.DynamicConstants.SHORT_NAME;
      String serverLocation = firstLocation;
      if (!Utils.directoryExistsAndIsNotEmpty(serverLocation))
      {
        serverLocation = data.getServerLocation();
      }
      tcServerLocation.setText(serverLocation);
      boolean isUpgrade = appl.getInstallAndUpgradeUserData().isUpgrade();
      rbInstall.setSelected(!isUpgrade);
      rbUpgrade.setSelected(isUpgrade);