Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 44379 invoked from network); 14 May 2008 23:38:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 23:38:19 -0000 Received: (qmail 39215 invoked by uid 500); 14 May 2008 23:38:21 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 39175 invoked by uid 500); 14 May 2008 23:38:21 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 39163 invoked by uid 99); 14 May 2008 23:38:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 16:38:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 23:37:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AC4B02388A09; Wed, 14 May 2008 16:37:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656466 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif: LdifControl.java LdifEntry.java LdifReader.java LdifUtils.java Date: Wed, 14 May 2008 23:37:54 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080514233754.AC4B02388A09@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Wed May 14 16:37:53 2008 New Revision: 656466 URL: http://svn.apache.org/viewvc?rev=656466&view=rev Log: o Updated and added missing Javadoc o Fixed some other warnings Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifControl.java directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifControl.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifControl.java?rev=656466&r1=656465&r2=656466&view=diff ============================================================================== --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifControl.java (original) +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifControl.java Wed May 14 16:37:53 2008 @@ -60,6 +60,7 @@ /** * Returns the criticality of the current control + * @return true if the control is critical */ public boolean isCritical() { @@ -79,6 +80,7 @@ /** * Return the control's OID as a String + * @return The control's OID */ public String getID() { @@ -88,8 +90,7 @@ /** * Set the control's OID * - * @param oid - * The control's OID + * @param oid The control's OID */ public void setOid( OID oid ) { @@ -98,6 +99,7 @@ /** * Returns the BER encoded value of the control + * @return the BER encoded value */ public byte[] getEncodedValue() { Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java?rev=656466&r1=656465&r2=656466&view=diff ============================================================================== --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java (original) +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java Wed May 14 16:37:53 2008 @@ -53,6 +53,7 @@ * - DN modified entries * * @author Apache Directory Project + * @version $Rev$, $Date$ */ public class LdifEntry implements Cloneable, Serializable { @@ -171,14 +172,12 @@ /** * Add a modification item (used by modify operations) * - * @param modOp - * The operation. One of : DirContext.ADD_ATTRIBUTE + * @param modOp The operation. One of : DirContext.ADD_ATTRIBUTE * DirContext.REMOVE_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE * - * @param attr - * The attribute to be added + * @param attr The attribute to be added */ - public void addModificationItem( int modOp, Attribute attr ) throws NamingException + public void addModificationItem( int modOp, Attribute attr ) { if ( changeType == ChangeType.Modify ) { @@ -198,9 +197,8 @@ * @param modOp The modification operation value * @param id The attribute's ID * @param value The attribute's value - * @throws NamingException if the modification can't be added */ - public void addModificationItem( int modOp, String id, Object value ) throws NamingException + public void addModificationItem( int modOp, String id, Object value ) { if ( changeType == ChangeType.Modify ) { @@ -480,6 +478,8 @@ /** * Clone method + * @return a clone of the current instance + * @exception CloneNotSupportedException If there is some problem while cloning the instance */ public LdifEntry clone() throws CloneNotSupportedException { @@ -517,23 +517,26 @@ /** * Dumps the attributes + * @return A String representing the attributes */ private String dumpAttributes() { StringBuffer sb = new StringBuffer(); + Attribute attribute = null; try { - for ( NamingEnumeration attrs = attributes.getAll(); attrs.hasMoreElements(); ) + for ( NamingEnumeration attrs = attributes.getAll(); + attrs.hasMoreElements(); + attribute = attrs.nextElement()) { - Attribute attribute = attrs.nextElement(); - sb.append( " ").append( attribute.getID() ).append( ":\n" ); - - for ( NamingEnumeration values = attribute.getAll(); values.hasMoreElements(); ) + Object value = null; + + for ( NamingEnumeration values = attribute.getAll(); + values.hasMoreElements(); + value = values.nextElement()) { - Object value = values.nextElement(); - if ( value instanceof String ) { sb.append( " " ).append( (String)value ).append('\n' ); @@ -555,6 +558,7 @@ /** * Dumps the modifications + * @return A String representing the modifications */ private String dumpModificationItems() { @@ -577,6 +581,9 @@ case DirContext.REPLACE_ATTRIBUTE : sb.append( "REPLACE \n" ); break; + + default : + break; // Do nothing } Attribute attribute = modif.getAttribute(); @@ -587,10 +594,11 @@ { try { - for ( NamingEnumeration values = attribute.getAll(); values.hasMoreElements(); ) + Object value = null; + for ( NamingEnumeration values = attribute.getAll(); + values.hasMoreElements(); + value = values.nextElement() ) { - Object value = values.nextElement(); - if ( value instanceof String ) { sb.append( " " ).append( (String)value ).append('\n' ); @@ -613,7 +621,7 @@ /** - * Return a String representing the Entry + * @return a String representing the Entry */ public String toString() { @@ -655,6 +663,9 @@ } break; + + default : + break; // Do nothing } return sb.toString(); @@ -663,6 +674,7 @@ /** * @see Object#equals(Object) + * @return true if both values are equal */ public boolean equals( Object o ) { @@ -826,6 +838,9 @@ } break; + + default : + break; // do nothing } if ( control != null ) Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=656466&r1=656465&r2=656466&view=diff ============================================================================== --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java (original) +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java Wed May 14 16:37:53 2008 @@ -37,7 +37,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.NoSuchElementException; import javax.naming.InvalidNameException; import javax.naming.NamingException; @@ -57,12 +56,16 @@ /** *
- *  <ldif-file> ::= "version:" <fill> <number> <seps> <dn-spec> <sep> <ldif-content-change>
+ *  <ldif-file> ::= "version:" <fill> <number> <seps> <dn-spec> <sep> 
+ *  <ldif-content-change>
  *  
  *  <ldif-content-change> ::= 
- *    <number> <oid> <options-e> <value-spec> <sep> <attrval-specs-e> <ldif-attrval-record-e> | 
- *    <alpha> <chars-e> <options-e> <value-spec> <sep> <attrval-specs-e> <ldif-attrval-record-e> | 
- *    "control:" <fill> <number> <oid> <spaces-e> <criticality> <value-spec-e> <sep> <controls-e> 
+ *    <number> <oid> <options-e> <value-spec> <sep> 
+ *    <attrval-specs-e> <ldif-attrval-record-e> | 
+ *    <alpha> <chars-e> <options-e> <value-spec> <sep> 
+ *    <attrval-specs-e> <ldif-attrval-record-e> | 
+ *    "control:" <fill> <number> <oid> <spaces-e> 
+ *    <criticality> <value-spec-e> <sep> <controls-e> 
  *        "changetype:" <fill> <changerecord-type> <ldif-change-record-e> |
  *    "changetype:" <fill> <changerecord-type> <ldif-change-record-e>
  *                              
@@ -82,7 +85,8 @@
  *                              
  *  <oid> ::= '.' <number> <oid> | e
  *                              
- *  <attrval-specs-e> ::= <number> <oid> <options-e> <value-spec> <sep> <attrval-specs-e> | 
+ *  <attrval-specs-e> ::= <number> <oid> <options-e> <value-spec> 
+ *  <sep> <attrval-specs-e> | 
  *    <alpha> <chars-e> <options-e> <value-spec> <sep> <attrval-specs-e> | e
  *                              
  *  <value-spec-e> ::= <value-spec> | e
@@ -97,11 +101,15 @@
  *                              
  *  <chars-e> ::= <char> <chars-e> |  e
  *  
- *  <changerecord-type> ::= "add" <sep> <attributeType> <options-e> <value-spec> <sep> <attrval-specs-e> | 
+ *  <changerecord-type> ::= "add" <sep> <attributeType> 
+ *  <options-e> <value-spec> <sep> <attrval-specs-e> | 
  *    "delete" <sep> | 
- *    "modify" <sep> <mod-type> <fill> <attributeType> <options-e> <sep> <attrval-specs-e> <sep> '-' <sep> <mod-specs-e> | 
- *    "moddn" <sep> <newrdn> <sep> "deleteoldrdn:" <fill> <0-1> <sep> <newsuperior-e> <sep> |
- *    "modrdn" <sep> <newrdn> <sep> "deleteoldrdn:" <fill> <0-1> <sep> <newsuperior-e> <sep>
+ *    "modify" <sep> <mod-type> <fill> <attributeType> 
+ *    <options-e> <sep> <attrval-specs-e> <sep> '-' <sep> <mod-specs-e> | 
+ *    "moddn" <sep> <newrdn> <sep> "deleteoldrdn:" 
+ *    <fill> <0-1> <sep> <newsuperior-e> <sep> |
+ *    "modrdn" <sep> <newrdn> <sep> "deleteoldrdn:" 
+ *    <fill> <0-1> <sep> <newsuperior-e> <sep>
  *  
  *  <newrdn> ::= ':' <fill> <safe-string> | "::" <fill> <base64-chars>
  *  
@@ -151,27 +159,45 @@
  * 
* * @author Apache Directory Project + * @version $Rev$, $Date$ */ public class LdifReader implements Iterator { /** A logger */ private static final Logger LOG = LoggerFactory.getLogger( LdifReader.class ); - /** A private class to track the current position in a line */ + /** + * A private class to track the current position in a line + * @author Apache Directory Project + * @version $Rev$, $Date$ + */ protected class Position { - public int pos; + /** The current position */ + protected int pos; + /** + * Creates a new instance of Position. + */ public Position() { pos = 0; } + /** + * Increment the current position by one + * + */ public void inc() { pos++; } + /** + * Increment the current position by the given value + * + * @param val The value to add to the current position + */ public void inc( int val ) { pos += val; @@ -263,13 +289,13 @@ { File inf = new File( ldifFileName ); - if ( inf.exists() == false ) + if ( !inf.exists() ) { LOG.error( "File {} cannot be found", inf.getAbsoluteFile() ); throw new NamingException( "Cannot find file " + inf.getAbsoluteFile() ); } - if ( inf.canRead() == false ) + if ( !inf.canRead() ) { LOG.error( "File {} cannot be read", inf.getName() ); throw new NamingException( "Cannot read file " + inf.getName() ); @@ -335,13 +361,13 @@ */ public LdifReader( File in ) throws NamingException { - if ( in.exists() == false ) + if ( !in.exists() ) { LOG.error( "File {} cannot be found", in.getAbsoluteFile() ); throw new NamingException( "Cannot find file " + in.getAbsoluteFile() ); } - if ( in.canRead() == false ) + if ( !in.canRead() ) { LOG.error( "File {} cannot be read", in.getName() ); throw new NamingException( "Cannot read file " + in.getName() ); @@ -402,6 +428,10 @@ * ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' * * Check that the number is in the interval + * + * @param document The document containing the number to parse + * @param position The current position in the document + * @return a String representing the parsed number */ private static String parseNumber( char[] document, Position position ) { @@ -611,7 +641,7 @@ File file = new File( fileName ); - if ( file.exists() == false ) + if ( !file.exists() ) { LOG.error( "File {} not found", fileName ); throw new NamingException( "Bad URL, file not found" ); @@ -652,17 +682,14 @@ } finally { - if ( inf != null ) + try + { + inf.close(); + } + catch ( IOException ioe ) { - try - { - inf.close(); - } - catch ( IOException ioe ) - { - LOG.error( "Error while closing the stream : {}", ioe.getMessage() ); - // Just do nothing ... - } + LOG.error( "Error while closing the stream : {}", ioe.getMessage() ); + // Just do nothing ... } } } @@ -702,9 +729,10 @@ * "false") ] [ ":" <fill> <SAFE-STRING-e> | "::" <fill> <BASE64-STRING> | ":<" * <fill> <url> ] * - * @param line - * The line containing the control + * @param line The line containing the control * @return A control + * @exception NamingException If the control has no OID or if the OID is incorrect, + * of if the criticality is not set when it's mandatory. */ private Control parseControl( String line ) throws NamingException { @@ -824,6 +852,7 @@ * Parse an AttributeType/AttributeValue * * @param line The line to parse + * @return the parsed Attribute */ public static Attribute parseAttributeValue( String line ) { @@ -950,10 +979,9 @@ * ATTRIBUTE-DESCRIPTION SEP <attrval-specs-e> "-" SEP <attrval-specs-e> ::= * ATTRVAL-SPEC <attrval-specs> | e * * - * @param entry - * The entry to feed - * @param iter - * The lines + * @param entry The entry to feed + * @param iter The lines + * @exception NamingException If the modify operation is invalid */ private void parseModify( LdifEntry entry, Iterator iter ) throws NamingException { @@ -1050,7 +1078,7 @@ String attributeType = line.substring( 0, colonIndex ); - if ( attributeType.equalsIgnoreCase( modified ) == false ) + if ( !attributeType.equalsIgnoreCase( modified ) ) { LOG.error( "The modified attribute and the attribute value spec must be equal" ); throw new NamingException( "Bad modify attribute" ); @@ -1095,17 +1123,12 @@ * ::= FILL ATTRIBUTE-DESCRIPTION SEP ATTRVAL-SPEC <attrval-specs-e> "-" SEP * <attrval-specs-e> ::= ATTRVAL-SPEC <attrval-specs> | e * - * @param entry - * The entry to feed - * @param iter - * The lines iterator - * @param operation - * The change operation (add, modify, delete, moddn or modrdn) - * @param control - * The associated control, if any - * @return A modification entry + * @param entry The entry to feed + * @param iter The lines iterator + * @param operation The change operation (add, modify, delete, moddn or modrdn) + * @exception NamingException If the change operation is invalid */ - private void parseChange( LdifEntry entry, Iterator iter, ChangeType operation, Control control ) throws NamingException + private void parseChange( LdifEntry entry, Iterator iter, ChangeType operation ) throws NamingException { // The changetype and operation has already been parsed. entry.setChangeType( operation ); @@ -1186,6 +1209,9 @@ * <dn-spec> <sep> <controls-e> <changerecord> <dn-spec> ::= "dn:" <fill> * <distinguishedName> | "dn::" <fill> <base64-distinguishedName> * <changerecord> ::= "changetype:" <fill> <change-op> + * + * @return the parsed ldifEntry + * @exception NamingException If the ldif file does not contain a valid entry */ private LdifEntry parseEntry() throws NamingException { @@ -1279,7 +1305,7 @@ operation = parseChangeType( line ); // Parse the change operation in a separate function - parseChange( entry, iter, operation, control ); + parseChange( entry, iter, operation ); changeTypeSeen = true; } else if ( line.indexOf( ':' ) > 0 ) @@ -1527,26 +1553,25 @@ File file = new File( fileName ); - if ( file.exists() == false ) + if ( !file.exists() ) { LOG.error( "Cannot parse the file {}, it does not exist", fileName ); throw new NamingException( "Filename " + fileName + " not found." ); } // Open the file and then get a channel from the stream - BufferedReader inf; - try { - inf = new BufferedReader( new InputStreamReader( new FileInputStream( file ), Charset.forName( encoding ) ) ); + BufferedReader inf = new BufferedReader( new InputStreamReader( new FileInputStream( file ), + Charset.forName( encoding ) ) ); + + return parseLdif( inf ); } catch (FileNotFoundException fnfe) { LOG.error( "Cannot find file {}", fileName ); throw new NamingException( "Filename " + fileName + " not found." ); } - - return parseLdif( inf ); } /** @@ -1597,7 +1622,7 @@ * * @return the next LDIF as a String. */ - public LdifEntry next() throws NoSuchElementException + public LdifEntry next() { try { @@ -1627,6 +1652,7 @@ } } + /** * Tests to see if another LDIF is on the input channel. * @@ -1639,6 +1665,7 @@ return null != prefetched; } + /** * Always throws UnsupportedOperationException! * Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=656466&r1=656465&r2=656466&view=diff ============================================================================== --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java (original) +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Wed May 14 16:37:53 2008 @@ -19,6 +19,18 @@ */ package org.apache.directory.shared.ldap.ldif; +import java.io.UnsupportedEncodingException; + +import java.util.ArrayList; +import java.util.List; + +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.Attribute; +import javax.naming.directory.Attributes; +import javax.naming.directory.DirContext; +import javax.naming.directory.ModificationItem; + import org.apache.directory.shared.ldap.message.AttributeImpl; import org.apache.directory.shared.ldap.message.ModificationItemImpl; import org.apache.directory.shared.ldap.name.LdapDN; @@ -27,21 +39,13 @@ import org.apache.directory.shared.ldap.util.Base64; import org.apache.directory.shared.ldap.util.StringTools; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; -import javax.naming.directory.Attribute; -import javax.naming.directory.Attributes; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.List; /** * Some LDIF useful methods * * @author Apache Directory Project + * @version $Rev$, $Date$ */ public class LdifUtils { @@ -148,6 +152,7 @@ * * @param ldif The LDIF string containing an attribute value * @return An Attributes instance + * @exception NamingException If the LDIF String cannot be converted to an Attributes */ public static Attributes convertAttributesFromLdif( String ldif ) throws NamingException { @@ -196,6 +201,7 @@ /** * Convert an Entry to LDIF * @param entry the entry to convert + * @param length The maximum line's length * @return the corresponding LDIF as a String * @throws NamingException If a naming exception is encountered. */ @@ -299,6 +305,9 @@ sb.append( "replace: " ); break; + default : + break; // Do nothing + } sb.append( modification.getAttribute().getID() ); @@ -309,6 +318,9 @@ } break; + default : + break; // Do nothing + } sb.append( '\n' ); @@ -317,20 +329,22 @@ } /** - * Base64 encode a String + * Base64 encode a String + * @param str The string to encode + * @return the base 64 encoded string */ private static String encodeBase64( String str ) { - char[] encoded; + char[] encoded =null; try { // force encoding using UTF-8 charset, as required in RFC2849 note 7 - encoded = Base64.encode( ( ( String ) str ).getBytes( "UTF-8" ) ); + encoded = Base64.encode( str.getBytes( "UTF-8" ) ); } catch ( UnsupportedEncodingException e ) { - encoded = Base64.encode( ( ( String ) str ).getBytes() ); + encoded = Base64.encode( str.getBytes() ); } return new String( encoded ); @@ -469,9 +483,8 @@ * * @param dn the dn of the added entry * @return a reverse LDIF - * @throws NamingException If something went wrong */ - public static LdifEntry reverseAdd( LdapDN dn ) throws NamingException + public static LdifEntry reverseAdd( LdapDN dn ) { LdifEntry entry = new LdifEntry(); entry.setChangeType( ChangeType.Delete ); @@ -487,9 +500,8 @@ * @param dn The deleted entry DN * @param deletedEntry The entry which has been deleted * @return A reverse LDIF - * @throws NamingException If something went wrong */ - public static LdifEntry reverseDel( LdapDN dn, Attributes deletedEntry ) throws NamingException + public static LdifEntry reverseDel( LdapDN dn, Attributes deletedEntry ) { LdifEntry entry = new LdifEntry(); @@ -519,8 +531,8 @@ public static LdifEntry reverseModifyDn( LdapDN newSuperiorDn, LdapDN modifiedDn ) throws NamingException { LdifEntry entry = new LdifEntry(); - LdapDN currentParent; - LdapDN newDn; + LdapDN currentParent = null; + LdapDN newDn = null; if ( newSuperiorDn == null ) { @@ -551,11 +563,20 @@ } + /** + * Revert a DN to it's previous version by removing the first RDN and adding the given RDN + * + * @param t0 The initial Attributes + * @param t0_dn The initial DN + * @param t1_rdn The new RDN + * @return A new LDIF entry with a reverted DN + * @throws NamingException If the name reverting failed + */ public static LdifEntry reverseRename( Attributes t0, LdapDN t0_dn, Rdn t1_rdn ) throws NamingException { LdifEntry entry = new LdifEntry(); - LdapDN parent; - LdapDN newDn; + LdapDN parent = null; + LdapDN newDn = null; if ( t1_rdn == null ) { @@ -659,7 +680,7 @@ } - private static boolean reverseDoDeleteOldRdn( Attributes t0_entry, Rdn t1_rdn ) throws NamingException + private static boolean reverseDoDeleteOldRdn( Attributes t0_entry, Rdn t1_rdn ) { // Consider simple example changes (rename or move does not matter) // ------------------------------------------------------------------- @@ -790,6 +811,10 @@ reverseModification = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, previous ); reverseModifications.add( 0, reverseModification ); break; + + default : + break; // Do nothing + } AttributeUtils.applyModification( clonedEntry, modification );