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

Jean-Noël Rouvignac
17.11.2015 14f94c13789b8ace4eae258b5f1d64494518f9c3
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VLVIndex.java
@@ -770,34 +770,30 @@
    {
      final AttributeType attributeType = sortKey.getAttributeType();
      final MatchingRule matchingRule = sortKey.getEffectiveOrderingRule();
      final List<Attribute> attrList = entry.getAttribute(attributeType);
      ByteString sortValue = null;
      if (attrList != null)
      for (Attribute a : entry.getAttribute(attributeType))
      {
        for (Attribute a : attrList)
        for (ByteString v : a)
        {
          for (ByteString v : a)
          try
          {
            try
            /*
             * The RFC states that the lowest value of a multi-valued attribute should be used,
             * regardless of the sort order.
             */
            final ByteString nv = matchingRule.normalizeAttributeValue(v);
            if (sortValue == null || nv.compareTo(sortValue) < 0)
            {
              /*
               * The RFC states that the lowest value of a multi-valued attribute should be used,
               * regardless of the sort order.
               */
              final ByteString nv = matchingRule.normalizeAttributeValue(v);
              if (sortValue == null || nv.compareTo(sortValue) < 0)
              {
                sortValue = nv;
              }
              sortValue = nv;
            }
            catch (final DecodeException e)
            {
              /*
               * This shouldn't happen because the attribute should have already been validated. If
               * it does then treat the value as missing.
               */
              continue;
            }
          }
          catch (final DecodeException e)
          {
            /*
             * This shouldn't happen because the attribute should have already been validated.
             * If it does then treat the value as missing.
             */
            continue;
          }
        }
      }