Issue Details (XML | Word | Printable)

Key: DIRSERVER-723
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Emmanuel Lecharny
Reporter: Pierre-Arnaud Marcelot
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Possible double add of extensibleMatchFilter in filter tree

Created: 29/Aug/06 04:58 PM   Updated: 31/Aug/06 08:10 AM
Return to search
Component/s: ldap
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 30/Aug/06 12:17 AM


 Description  « Hide
In internal class "GrammarAction("Init extensible match Filter" )" (line 97), I think that the extensibleMatchFilter may be added twice in the Filter tree.

The following code add the Filter :
------------------
// Get the parent, if any
                    Filter currentFilter = searchRequest.getCurrentFilter();

                    if ( currentFilter != null )
                    {
                        // Ok, we have a parent. The new Filter will be added to
                        // this parent, then.
                        ( ( ConnectorFilter ) currentFilter ).addFilter( extensibleMatchFilter );
                        extensibleMatchFilter.setParent( currentFilter );
                    }
                    else
                    {
                        // No parent. This Filter will become the root.
                        searchRequest.setFilter( extensibleMatchFilter );
                        extensibleMatchFilter.setParent( searchRequest );
                    }
------------------

and then, the addCurrentFilter( extensibleMatchFilter ) method is called and does the same thing another time.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny made changes - 29/Aug/06 11:58 PM
Field Original Value New Value
Assignee Emmanuel Lecharny [ elecharny ]
Emmanuel Lecharny made changes - 29/Aug/06 11:58 PM
Status Open [ 1 ] In Progress [ 3 ]
Emmanuel Lecharny added a comment - 30/Aug/06 12:17 AM
Whaoo !!! What a bug !

Thanks a lot for the find, I could have spend hours trying to find it later !

Fixed, the code has been removed.

Emmanuel Lecharny made changes - 30/Aug/06 12:17 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Repository Revision Date User Message
ASF #438319 Wed Aug 30 01:01:23 UTC 2006 elecharny Fixed DIRSERVER-723 : removed duplicate code.
Files Changed
MODIFY /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java

Pierre-Arnaud Marcelot added a comment - 31/Aug/06 08:10 AM
Great!

I'm closing the issue.

Pierre-Arnaud Marcelot made changes - 31/Aug/06 08:10 AM
Status Resolved [ 5 ] Closed [ 6 ]