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

jvergara
07.35.2008 f857a84d4676eb10d4116d9f2ffd80e943d59ff1
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
opends/src/quicksetup/org/opends/quicksetup/upgrader/MigrationManager.java 5 ●●●● patch | view | raw | blame | history
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;
  }
  /**