directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorenz Breu (JIRA)" <>
Subject [jira] Updated: (DIRSERVER-1296) integer attribute types are not compared correctly
Date Tue, 06 Jan 2009 14:54:44 GMT


Lorenz Breu updated DIRSERVER-1296:

    Attachment: patch_SearchIT.txt

hope this worked...

should be a diff between my working copy and the repo version of in core-integ.

I added an AT "integerAttribute" with "integerOrderingMatch", added the OC "extensibleObject"
to the test oranizationalUnits and gave them new integerAttributes matching their number.
In addition I added 3 new such test OUs... The old tests still pass.

Now the integerComaprisonTests test for the right issue. They fail without the "fix" in ComparableComparator
and pass if it is there, so my initial fix does work...

However, I do realize it is a hack. The problem is, that the "integerOrderingMatch" MatchingRule
is assigned a ComparableComparator in the ComparatorRegistry. I do not know, where this happens,
but if somebody does, then it would be much nicer to change that to some NumericalComparator
there, than trying to parse the strings as I have done.

> integer attribute types are not compared correctly
> --------------------------------------------------
>                 Key: DIRSERVER-1296
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.4
>            Reporter: Lorenz Breu
>             Fix For: 1.5.5
>         Attachments:, patch_SearchIT.txt,
> 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
> 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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message