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

jvergara
18.17.2009 61566abc6ddfcad1491e3bb71a5cc157daf6dd57
Fix for issue 4189 (dsconfig : --commandFilePath mis-behaviour when correcting errors in interactiv mode)

The PropertyValueEditor object was not kept if there was an error, this created some inaccurate equivalent commands to be displayed when the user made a mistake creating or modifying configuration objects.
3 files modified
11 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 3 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -720,8 +720,8 @@
    ManagedObjectDefinition<?, ?> d = mo.getManagedObjectDefinition();
    Message ufn = d.getUserFriendlyName();
    PropertyValueEditor editor = new PropertyValueEditor(app, context);
    while (true) {
      PropertyValueEditor editor = new PropertyValueEditor(app, context);
      // Interactively set properties if applicable.
      if (app.isInteractive()) {
        SortedSet<PropertyDefinition<?>> properties =
@@ -1156,7 +1156,6 @@
    // Get the naming argument values.
    List<String> names = getNamingArgValues(app, namingArgs);
    // Reset the command builder
    getCommandBuilder().clearArguments();
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
@@ -2219,8 +2219,8 @@
  // The modifications performed: we assume that at most there is one
  // modification per property definition.
  private final List<PropertyEditorModification> mods =
    new ArrayList<PropertyEditorModification>();
  private final List<PropertyEditorModification<?>> mods =
    new ArrayList<PropertyEditorModification<?>>();
  // Whether the last type of choice made by the user in a menu is a
  // reset
@@ -2576,7 +2576,7 @@
   * @return the modifications that have been applied during the last call of
   * the method PropertyValueEditor.edit.
   */
  public Collection<PropertyEditorModification> getModifications()
  public Collection<PropertyEditorModification<?>> getModifications()
  {
    return mods;
  }
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -263,8 +263,8 @@
    ManagedObjectDefinition<?, ?> d = mo.getManagedObjectDefinition();
    Message ufn = d.getUserFriendlyName();
    PropertyValueEditor editor = new PropertyValueEditor(app, context);
    while (true) {
      PropertyValueEditor editor = new PropertyValueEditor(app, context);
      // Interactively set properties if applicable.
      if (app.isInteractive()) {
        SortedSet<PropertyDefinition<?>> properties =