From 10a819ab6dbe9e8c6e525b160687d2dcd6715dcc Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 18 Nov 2009 17:17:48 +0000
Subject: [PATCH] Fix for issue 4189 (dsconfig : --commandFilePath mis-behaviour when correcting errors in interactiv mode)

---
 opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java |    2 +-
 opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java      |    6 +++---
 opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java  |    3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java b/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
index b58b5dc..acb448a 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
+++ b/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();
 
diff --git a/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java b/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
index c0b98c1..592707c 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
+++ b/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;
   }
diff --git a/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java b/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
index 5b16f0e..b3572d9 100644
--- a/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
+++ b/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 =

--
Gitblit v1.10.0