You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2007/12/09 00:45:04 UTC
svn commit: r602580 -
/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
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,