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

Fabio Pistolesi
22.57.2015 1d472eb1a33949f59d5f9658a4e84acfbe059c1b
OPENDJ-2045 dsconfig fails when creating index on attribute "l" with multiple types

Specifying multiple types at index creation could lead to trying to modify an immutable object.
Set all types to add to the existing list.
1 files modified
6 ■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -251,11 +251,11 @@
      switch (indexType)
      {
      case PRESENCE:
        indexers = Collections.singleton(PRESENCE_INDEXER);
        indexers.add(PRESENCE_INDEXER);
        break;
      case EXTENSIBLE:
        indexers =
            getExtensibleIndexers(config.getAttribute(), config.getIndexExtensibleMatchingRule(), indexingOptions);
        indexers.addAll(
            getExtensibleIndexers(config.getAttribute(), config.getIndexExtensibleMatchingRule(), indexingOptions));
        break;
      case APPROXIMATE:
        rule = throwIfNoMatchingRule(attributeType, indexType, attributeType.getApproximateMatchingRule());