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/10/26 23:11:37 UTC

svn commit: r328735 - /directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java

Author: elecharny
Date: Wed Oct 26 14:11:32 2005
New Revision: 328735

URL: http://svn.apache.org/viewcvs?rev=328735&view=rev
Log:
Changed the equals method to be able to deal with comparizon of String and byte[] values

Modified:
    directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java

Modified: directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java?rev=328735&r1=328734&r2=328735&view=diff
==============================================================================
--- directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java (original)
+++ directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java Wed Oct 26 14:11:32 2005
@@ -205,9 +205,11 @@
         }
 
         Iterator list = req.getModificationItems().iterator();
+        
         for ( int ii = 0; ii < mods.size(); ii++ )
         {
             ModificationItem item = ( ModificationItem ) list.next();
+            
             if ( ! equals( ( ModificationItem ) mods.get( ii ), item ) )
             {
                 return false;
@@ -267,7 +269,21 @@
 	        	
 	        	if ( attrHash0.contains( value ) == false )
 	        	{
-	        		return false;
+                    if (value instanceof byte[] )
+                    {
+                        if ( attrHash0.contains( StringUtils.toUtf8( (byte[])value ) ) == false )
+                        {
+                            return false;
+                        }
+                        else
+                        {
+                            continue;
+                        }
+                    }
+                    else
+                    {
+                        return false;
+                    }
 	        	}
 	        	else
 	        	{