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

jvergara
26.23.2009 37d7f8c33478c0dca2ccc3d1f4c9c3a354d1dcaa
Fix a problem with the generation of the equivalent command-line.
1 files modified
25 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java 25 ●●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/IndexPanel.java
@@ -875,9 +875,32 @@
      if (!indexTypes.equals(indexToModify.getTypes()))
      {
        // To add
        Set<IndexType> toAdd = new TreeSet<IndexType>();
        for (IndexType newType : indexTypes)
        {
          args.add("--set");
          if (!indexToModify.getTypes().contains(newType))
          {
            toAdd.add(newType);
          }
        }
        // To delete
        Set<IndexType> toDelete = new TreeSet<IndexType>();
        for (IndexType oldType : indexToModify.getTypes())
        {
          if (!indexTypes.contains(oldType))
          {
            toDelete.add(oldType);
          }
        }
        for (IndexType newType : toAdd)
        {
          args.add("--add");
          args.add("index-type:"+newType.toString());
        }
        for (IndexType newType : toDelete)
        {
          args.add("--remove");
          args.add("index-type:"+newType.toString());
        }
      }