Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1296

integer attribute types are not compared correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 1.5.5
    • core
    • None

    Description

      When searching for entries that have attributes with the INTEGER syntax, the values are compared lexicographically, not numerically. This happens even if the ordering and equality types are explicitly set to their integer versions when injecting the attribute types into ADS.

      Example:
      dn: cn = foo, dc = example
      cn: foo
      integerAttribute: 435

      now a search using "(integerAttribute<=500)" will correctly return the entry....
      but a search using "(integerAttribute<=44)" will ALSO return the entry, which it clearly should not.

      Attachments

        1. SearchIT.java
          62 kB
          Lorenz Breu
        2. patch_SearchIT.txt
          14 kB
          Lorenz Breu
        3. ComparableComparator.java
          3 kB
          Lorenz Breu

        Activity

          People

            Unassigned Unassigned
            breul Lorenz Breu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: