You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/08/17 21:46:42 UTC
[directory-ldap-api] branch master updated: Removed commented code
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 <el...@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;
+ }
+ */
}