directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r891319 - /directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
Date Wed, 16 Dec 2009 17:06:32 GMT
Author: elecharny
Date: Wed Dec 16 17:06:32 2009
New Revision: 891319

URL: http://svn.apache.org/viewvc?rev=891319&view=rev
Log:
Fixed a bug in the cloning of ServerEntries :we could get some NPE in some corner cases 

Modified:
    directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java?rev=891319&r1=891318&r2=891319&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
Wed Dec 16 17:06:32 2009
@@ -2282,10 +2282,10 @@
         // now clone all the servrAttributes
         clone.attributes.clear();
         
-        for ( AttributeType key:attributes.keySet() )
+        for ( EntryAttribute entryAttribute : attributes.values() )
         {
-            EntryAttribute value = (ServerAttribute)attributes.get( key ).clone();
-            clone.attributes.put( key, value );
+            ServerAttribute value = (ServerAttribute)entryAttribute.clone();
+            clone.attributes.put( value.getAttributeType(), value );
         }
         
         // We are done !



Mime
View raw message