directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r328735 - /directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/message/ModifyRequestImpl.java
Date Wed, 26 Oct 2005 21:11:37 GMT
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
 	        	{



Mime
View raw message