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 2005/09/10 00:41:00 UTC
svn commit: r279900 -
/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/CompareRequestImpl.java
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;
}