You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2006/08/30 03:01:23 UTC
svn commit: r438319 -
/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java
Author: elecharny
Date: Tue Aug 29 18:01:23 2006
New Revision: 438319
URL: http://svn.apache.org/viewvc?rev=438319&view=rev
Log:
Fixed DIRSERVER-723 : removed duplicate code.
Modified:
directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java
Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java?rev=438319&r1=438318&r2=438319&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java Tue Aug 29 18:01:23 2006
@@ -105,23 +105,6 @@
// We can allocate the ExtensibleMatch Filter
Filter extensibleMatchFilter = new ExtensibleMatchFilter();
- // 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 );
- }
-
searchRequest.addCurrentFilter( extensibleMatchFilter );
searchRequest.setTerminalFilter( extensibleMatchFilter );
}
@@ -159,6 +142,8 @@
if ( tlv.getLength().getLength() == 0 )
{
log.error( "The matching rule is empty" );
+
+ // It will generate a PROTOCOL_ERROR
throw new DecoderException( "Invalid matching rule : it can't be empty" );
}
else
@@ -171,6 +156,8 @@
{
String msg = StringTools.dumpBytes( tlv.getValue().getData() );
log.error( "The matching rule ({}) is invalid", msg );
+
+ // It will generate a PROTOCOL_ERROR
throw new DecoderException( "Invalid matching rule " + msg + ", : " + lsee.getMessage() );
}
}