directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject Missing MatchingRule (for ObjectClass, DN, etc ...)
Date Mon, 08 Oct 2007 12:39:26 GMT
Hi guys,

I have committed ( and reverted) some silly fix for what I thought was
a bug in the server : when you try to filter searches using substring,
like :

applying the following rule  (RFC 4511, par

"A filter item evaluates to Undefined when the server would not be
   able to determine whether the assertion value matches an entry.
   Examples include:

   - An attribute description in an equalityMatch, substrings,
     greaterOrEqual, lessOrEqual, approxMatch, or extensibleMatch filter
     is not recognized by the server.

   - The attribute type does not define the appropriate matching rule."

we should set the evaluation to undefined. This is not what we have
currently, as we get a NPE if we don't have a defined MatchingRule,
resulting to an undefined Exception :

        Normalizer normalizer = type.getSubstr().getNormalizer();

    public MatchingRule getSubstr() throws NamingException
        if ( substrOid == null )
            return findSubstr( getSuperior() );
    public AttributeType getSuperior() throws NamingException
        if ( superiorOid == null )
            return null;

The tests semantics is a little bit biased though.

I have some questions now :
- How does other servers react with such searches ?
- Should we default to EqualityMatch if we don't have a matchingRule
for an AttributeType ?

wdyt ?

Emmanuel L├ęcharny

View raw message