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 Mon, 05 Jan 2009 10:25:44 GMT


Lorenz Breu updated DIRSERVER-1296:


Tracked the integer comparison to the "ComparableComparator" which treats them as Strings,
so I added a quick fix to first try to parse arguments as integers. There may be a more elegant
solution, but at least now it works correctly ;)

I also added 4 quick tests to SearchIT as the two existing tests fail to spot the error as
they stay below 10. I did a fresh install of mina and apacheds without the fix -> fail.
I then applied the fix and ran the complete set of integration tests on the whole apacheds
project -> success. Tests I use in my ADS-based project, which spotted the problem in the
first place, now also pass. So I guess this does actually work...

> 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:,
> 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