getEquality(), getSubstr() and getOrdering() methods of the AttributeTypeImpl 
class does not return any MatchingRule from a superior attribute type
---------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DIRSERVER-962
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-962
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
    Affects Versions: 1.5.0
            Reporter: Pierre-Arnaud Marcelot


I think I have found a bug in the AttributeTypeImpl class (package: 
org.apache.directory.server.core.schema, project:shared-ldap).

The getEquality(), getSubstr() and getOrdering() methods use 
findEquality(AttributeType at ), findSubstr(AttributeType at ) and 
findOrdering(AttributeType at ) methods to get the corresponding MatchingRule  
from the superior AttributeType, when there's no matching rule declared in the 
current AttributeType.

These methods recursively search for the matchingRule if one exists within the 
attribute hierarchy with the following code.

-----
    private MatchingRule findEquality( AttributeType at ) throws NamingException
    {
        if ( at == null )
        {
            return null;
        }
        
        if ( at.getEquality() == null )
        {
            return findEquality( at.getSuperior() );
        }
        
        return null;
    }
-----

But I'm afraid that code will never return any matching rule.

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

Reply via email to