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 2010/06/11 17:55:58 UTC
svn commit: r953743 -
/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Author: elecharny
Date: Fri Jun 11 15:55:58 2010
New Revision: 953743
URL: http://svn.apache.org/viewvc?rev=953743&view=rev
Log:
Forgot to commit this file
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=953743&r1=953742&r2=953743&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Fri Jun 11 15:55:58 2010
@@ -531,19 +531,7 @@ public class DefaultPartitionNexus exten
*/
public boolean compare( CompareOperationContext compareContext ) throws LdapException
{
- Partition partition = getPartition( compareContext.getDn() );
- //AttributeTypeRegistry registry = schemaManager.getAttributeTypeRegistry();
-
- // complain if we do not recognize the attribute being compared
- if ( !schemaManager.getAttributeTypeRegistry().contains( compareContext.getOid() ) )
- {
- throw new LdapInvalidAttributeTypeException( I18n.err( I18n.ERR_266, compareContext.getOid() ) );
- }
-
- AttributeType attrType = schemaManager.lookupAttributeTypeRegistry( compareContext.getOid() );
-
- EntryAttribute attr = partition.lookup( compareContext.newLookupContext( compareContext.getDn() ) ).get(
- attrType.getName() );
+ EntryAttribute attr = compareContext.getOriginalEntry().get( compareContext.getAttributeType() );
// complain if the attribute being compared does not exist in the entry
if ( attr == null )
@@ -552,7 +540,7 @@ public class DefaultPartitionNexus exten
}
// see first if simple match without normalization succeeds
- if ( attr.contains( ( Value<?> ) compareContext.getValue() ) )
+ if ( attr.contains( compareContext.getValue() ) )
{
return true;
}
@@ -564,7 +552,7 @@ public class DefaultPartitionNexus exten
* assertion value for comparisons with normalized attribute values. Loop
* through all values looking for a match.
*/
- Normalizer normalizer = attrType.getEquality().getNormalizer();
+ Normalizer normalizer = compareContext.getAttributeType().getEquality().getNormalizer();
Value<?> reqVal = normalizer.normalize( compareContext.getValue() );
for ( Value<?> value : attr )