directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r602580 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Date Sat, 08 Dec 2007 23:45:04 GMT
Author: akarasulu
Date: Sat Dec  8 15:45:03 2007
New Revision: 602580

URL: http://svn.apache.org/viewvc?rev=602580&view=rev
Log:
fix a accounting bug when removing values on modify remove operation

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=602580&r1=602579&r2=602580&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
Sat Dec  8 15:45:03 2007
@@ -1126,9 +1126,12 @@
                             log.error( "Trying to remove a required attribute: " + change.getID()
);
                             throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
                         }
-                        
-                        // Put back the attribute in the entry
-                        tmpEntry.put( modified );
+
+                        // Put back the attribute in the entry only if it has values left
in it
+                        if ( modified.size() > 0 )
+                        {
+                            tmpEntry.put( modified );
+                        }
                     }
                     
                     SchemaChecker.preventRdnChangeOnModifyRemove( name, modOp, change, 



Mime
View raw message