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

Fabio Pistolesi
22.57.2015 3b17a5c6bdc456244ace9ce173363873da91f503
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-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java 6 ●●●● patch | view | raw | blame | history
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());