directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] branch master updated: Removed commented code
Date Fri, 17 Aug 2018 21:46:42 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 37fcd93  Removed commented code
37fcd93 is described below

commit 37fcd9367fe15133d632389e5252e608dba9ad23
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Fri Aug 17 23:46:40 2018 +0200

    Removed commented code
---
 .../api/ldap/model/entry/DefaultEntry.java         | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
index 676e926..bc65886 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultEntry.java
@@ -1080,6 +1080,42 @@ public final class DefaultEntry implements Entry
 
         // We are done !
         return clone;
+
+        /*
+        // First, clone the structure
+        //DefaultEntry clone = ( DefaultEntry ) shallowClone();
+        try
+        {
+            DefaultEntry clone = ( DefaultEntry ) super.clone();
+            clone.attributes = new HashMap<>( attributes.size() );
+    
+            // now clone all the attributes
+            //clone.attributes.clear();
+    
+            if ( schemaManager != null )
+            {
+                for ( Attribute attribute : attributes.values() )
+                {
+                    String oid = attribute.getAttributeType().getOid();
+                    clone.attributes.put( oid, attribute.clone() );
+                }
+            }
+            else
+            {
+                for ( Attribute attribute : attributes.values() )
+                {
+                    clone.attributes.put( attribute.getId(), attribute.clone() );
+                }
+            }
+
+            // We are done !
+            return clone;
+        }
+        catch ( CloneNotSupportedException cnse )
+        {
+            return this;
+        }
+        */
     }
 
 


Mime
View raw message