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

lutoff
28.18.2008 201ac0d920ababa33c33a207203b90d26a2b78b0
fix for issue #3209 (ClassCastException when deleting global ACI with dsconfig)

[thanks to Matt for his help]

Add propertyDefinition when creating new TreeSet<T>()
2 files modified
16 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyEditorModification.java 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyEditorModification.java
@@ -80,10 +80,8 @@
  {
    this.propertyDefinition = propertyDefinition;
    this.type = type;
    this.values = new TreeSet<T>();
    this.values.addAll(values);
    this.originalValues = new TreeSet<T>();
    this.originalValues.addAll(originalValues);
    this.values = new TreeSet<T>(values);
    this.originalValues = new TreeSet<T>(originalValues);
  }
  /**
@@ -97,7 +95,7 @@
      PropertyDefinition<T> propertyDefinition, SortedSet<T> originalValues)
  {
    return new PropertyEditorModification<T>(propertyDefinition, Type.RESET,
        new TreeSet<T>(), originalValues);
        new TreeSet<T>(propertyDefinition), originalValues);
  }
  /**
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
@@ -2426,7 +2426,7 @@
    SortedSet<T> originalValues;
    if (mod != null)
    {
      originalValues = new TreeSet<T>();
      originalValues = new TreeSet<T>(pd);
      castAndAddValues(originalValues, mod.getOriginalValues(), pd);
      removeModification(mod);
    }
@@ -2457,7 +2457,7 @@
    SortedSet<T> originalValues;
    if (mod != null)
    {
      originalValues = new TreeSet<T>();
      originalValues = new TreeSet<T>(pd);
      castAndAddValues(originalValues, mod.getOriginalValues(), pd);
      removeModification(mod);
    }
@@ -2488,7 +2488,7 @@
    SortedSet<T> originalValues;
    if (mod != null)
    {
      originalValues = new TreeSet<T>();
      originalValues = new TreeSet<T>(pd);
      castAndAddValues(originalValues, mod.getOriginalValues(), pd);
      if (mod.getType() == PropertyEditorModification.Type.ADD)
      {
@@ -2534,7 +2534,7 @@
    SortedSet<T> originalValues;
    if (mod != null)
    {
      originalValues = new TreeSet<T>();
      originalValues = new TreeSet<T>(pd);
      castAndAddValues(originalValues, mod.getOriginalValues(), pd);
      if (newValues.isEmpty())
      {