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

Violette Roche-Montane
29.46.2013 9da0e4e944ec51ed4e65961c2389bfe1aa314cae
OPENDJ-928 Update tool: add option to automatically accept the license
- License is now accepted at the end of upgrade's process (if no errors).
1 files modified
14 ■■■■■ changed files
opends/src/server/org/opends/server/tools/upgrade/Upgrade.java 14 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/upgrade/Upgrade.java
@@ -411,6 +411,9 @@
        // At the end, and if only if succeed, we need to change the buildInfo
        // file with the version number updated.
        changeBuildInfoVersion(context, handler);
        // Writes the license if needed.
        LicenseFile.createFileLicenseApproved();
      }
      else
      {
@@ -661,26 +664,19 @@
          }
          else if (answer == ConfirmationCallback.YES)
          {
            createLicenseApproval();
            LicenseFile.setApproval(true);
          }
        }
        else
        {
          context.notify(handler, INFO_LICENSE_ACCEPT.get());
          context.notify(handler, INFO_PROMPT_YES_COMPLETE_ANSWER.get());
          createLicenseApproval();
          LicenseFile.setApproval(true);
        }
      }
    }
  }
  private static void createLicenseApproval()
  {
    // Creates the file
    LicenseFile.setApproval(true);
    LicenseFile.createFileLicenseApproved();
  }
  // Prevent instantiation.
  private Upgrade()
  {