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

jvergara
07.35.2008 25addae6fcca9b8af089a784edc8ff02abe46439
Fix for 2647

Instead of basing on the contents of the Installation (since it changes during the upgrade process) use a boolean to determine whether the schema has been customized or not as return value of MigrationManager.isSchemaCustomized (in any case the method's javadoc already required MigrationManager.calculateSchemaCustomizations to be called so there is no change of behavior).
1 files modified
5 ■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java 5 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java
@@ -75,6 +75,7 @@
  private Installation installation;
  private File backupDir;
  private UserInteraction ui;
  private boolean isSchemaCustomized;
  /**
   * Creates a new parameterized instance.
@@ -111,6 +112,7 @@
   *         the diff operation
   */
  public void calculateSchemaCustomizations() throws ApplicationException {
    isSchemaCustomized = false;
    if (installation.getStatus().schemaHasBeenModified()) {
      LOG.log(Level.INFO, "Schema contains customizations that will " +
              "be migrated");
@@ -118,6 +120,7 @@
        ldifDiff(installation.getBaseSchemaFile(),
                installation.getSchemaConcatFile(),
                getCustomSchemaDiffFile());
        isSchemaCustomized = true;
      } catch (ApplicationException ae) {
        throw ae;
      } catch (Exception e) {
@@ -268,7 +271,7 @@
   * @return boolean where true indicates schema customization
   */
  public boolean isSchemaCustomized() {
    return installation.getStatus().schemaHasBeenModified();
    return isSchemaCustomized;
  }
  /**