directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r279900 - /directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java
Date Fri, 09 Sep 2005 22:41:00 GMT
Author: elecharny
Date: Fri Sep  9 15:40:54 2005
New Revision: 279900

URL: http://svn.apache.org/viewcvs?rev=279900&view=rev
Log:
Fixed an error in equals method. As the value is stored in a byte, it should not be a simple
comparaison.

Modified:
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java?rev=279900&r1=279899&r2=279900&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java
Fri Sep  9 15:40:54 2005
@@ -253,7 +253,14 @@
 
         if ( attrVal != null && req.getAssertionValue() != null )
         {
-            if ( ! attrVal.equals( req.getAssertionValue() ) )
+            try 
+            {
+                if ( ! new String( attrVal, "UTF-8").equals( req.getAssertionValue() ) )
+                {
+                    return false;
+                }
+            }
+            catch ( UnsupportedEncodingException uee )
             {
                 return false;
             }



Mime
View raw message