directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve hammond (JIRA)" <>
Subject [jira] Created: (DIRSHARED-25) BranchNormalizedVisitor cannot handle Nots
Date Wed, 18 Feb 2009 18:06:01 GMT
BranchNormalizedVisitor cannot handle Nots

                 Key: DIRSHARED-25
             Project: Directory Shared
          Issue Type: Bug
    Affects Versions: 0.9.11
            Reporter: Steve hammond

SearchRequestImpl uses BranchNormalizedVisitor and fails on comparisons if there is a not
in the clause.

To fix it I removed the (if NotNode) return null.  And all was well.

I tried to add the following test to BranchNormalizedVisitorTest
   public void testBranchNormalizedVisitor4() throws Exception
       ExprNode ori = FilterParser.parse( "(&(!(sn=Bob))(ou=Human Resources)(uid=akarasulu))"

       ExprNode altered = FilterParser.parse( "(&(ou=Human Resources)(uid=akarasulu)(!(sn=Bob)))"

       BranchNormalizedVisitor visitor = new BranchNormalizedVisitor();

       visitor.visit( altered );

       assertTrue( ori.toString().equals( altered.toString() ) );

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

View raw message