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

jcambon
12.20.2008 17641c981d7f2f59374f02110edccda3b9ccb5f2
Fix for Issue #3569 (cont'd): dsconfig does not handle correctly multi-valued properties

The fix prevented to do a set and reset on different properties at a time.

1 files modified
14 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 14 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -754,9 +754,6 @@
    // Set properties.
    for (String m : propertySetArgument.getValues()) {
      if (!propertyResetArgument.getValues().isEmpty()) {
        throw ArgumentExceptionFactory.incompatiblePropertyModification(m);
      }
      // Parse the property "property:value".
      int sep = m.indexOf(':');
@@ -783,6 +780,11 @@
      }
      // Apply the modification.
      if (lastModTypes.containsKey(propertyName) &&
        (lastModTypes.get(propertyName) == ModificationType.SET)) {
        throw ArgumentExceptionFactory.incompatiblePropertyModification(m);
      }
      if (lastModTypes.containsKey(propertyName)) {
        modifyPropertyValues(child, pd, changes, ModificationType.ADD, value);
      } else {
@@ -793,9 +795,6 @@
    // Remove properties.
    for (String m : propertyRemoveArgument.getValues()) {
      if (!propertyResetArgument.getValues().isEmpty()) {
        throw ArgumentExceptionFactory.incompatiblePropertyModification(m);
      }
      // Parse the property "property:value".
      int sep = m.indexOf(':');
@@ -833,9 +832,6 @@
    // Add properties.
    for (String m : propertyAddArgument.getValues()) {
      if (!propertyResetArgument.getValues().isEmpty()) {
        throw ArgumentExceptionFactory.incompatiblePropertyModification(m);
      }
      // Parse the property "property:value".
      int sep = m.indexOf(':');