BranchNormalizedVisitor cannot handle Nots
------------------------------------------
Key: DIRSHARED-25
URL: https://issues.apache.org/jira/browse/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.