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 2007/08/19 09:46:22 UTC
svn commit: r567365 -
/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
Author: elecharny
Date: Sun Aug 19 00:46:22 2007
New Revision: 567365
URL: http://svn.apache.org/viewvc?view=rev&rev=567365
Log:
Removed duplicated codce
Added a TODO fix DIRSERVER-832
Fixed a potential error (DIRSERVER-832)
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java?view=diff&rev=567365&r1=567364&r2=567365
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java Sun Aug 19 00:46:22 2007
@@ -302,7 +302,7 @@
// get the attribute associated with the node
Attributes attrs = rec.getAttributes();
- AttributeType type = attributeTypeRegistry.lookup( oidRegistry.getOid( node.getAttribute() ) );
+ AttributeType type = attributeTypeRegistry.lookup( node.getAttribute() );
Attribute attr = AttributeUtils.getAttribute( attrs, type );
// If we do not have the attribute just return false
@@ -311,17 +311,11 @@
return false;
}
- // check if AVA value exists in attribute
- if ( attr.contains( node.getValue() ) )
- {
- return true;
- }
-
// get the normalized AVA filter value
Object filterValue = node.getValue();
// check if the normalized value is present
- if ( attr.contains( filterValue ) )
+ if ( AttributeUtils.containsValue(attr, node.getValue(), type ) )
{
return true;
}
@@ -332,10 +326,12 @@
* to determine if a match exists.
*/
NamingEnumeration list = attr.getAll();
+
while ( list.hasMore() )
{
Object value = normalizer.normalize( list.next() );
+ // TODO Fix DIRSERVER-832
if ( 0 == comparator.compare( value, filterValue ) )
{
return true;