directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r891085 - /directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
Date Wed, 16 Dec 2009 00:47:45 GMT
Author: elecharny
Date: Wed Dec 16 00:47:45 2009
New Revision: 891085

URL: http://svn.apache.org/viewvc?rev=891085&view=rev
Log:
Fixed the value comparisons : the MatchingRule was not used to normalize values before the
comparison.

Modified:
    directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java?rev=891085&r1=891084&r2=891085&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
Wed Dec 16 00:47:45 2009
@@ -422,7 +422,15 @@
                 }
                 else
                 {
-                    return comparator.compare( getNormalizedValue(), other.getNormalizedValue()
) == 0;
+                    if ( isNormalized() )
+                    {
+                        return comparator.compare( getNormalizedValue(), other.getNormalizedValue()
) == 0;
+                    }
+                    else
+                    {
+                        Normalizer normalizer = attributeType.getEquality().getNormalizer();
+                        return comparator.compare( normalizer.normalize( get() ), normalizer.normalize(
other.get() ) ) == 0;
+                    }
                 }
             }
             catch ( NamingException ne )



Mime
View raw message