directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1090163 - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
Date Fri, 08 Apr 2011 09:03:31 GMT
Author: elecharny
Date: Fri Apr  8 09:03:31 2011
New Revision: 1090163

URL: http://svn.apache.org/viewvc?rev=1090163&view=rev
Log:
Cleaned up the Modification class, removing some unused constructor, fixing the Javadoc

Modified:
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java?rev=1090163&r1=1090162&r2=1090163&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareModificationSerializationTest.java
Fri Apr  8 09:03:31 2011
@@ -28,9 +28,9 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -159,7 +159,7 @@ public class SchemaAwareModificationSeri
         Attribute attribute = new DefaultAttribute( "cn", CN_AT );
         attribute.add( "test1", "test2" );
         
-        Modification mod = new DefaultModification( CN_AT, ModificationOperation.ADD_ATTRIBUTE,
attribute );
+        Modification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE,
attribute );
         Modification clone = mod.clone();
         
         attribute.remove( "test2" );
@@ -167,7 +167,7 @@ public class SchemaAwareModificationSeri
         Attribute clonedAttribute = clone.getAttribute();
         
         assertEquals( 1, mod.getAttribute().size() );
-        assertTrue( mod.getAttribute().contains( "test1" ) );
+        assertTrue( mod.getAttribute().contains( "TEST1" ) );
 
         assertEquals( 2, clonedAttribute.size() );
         assertTrue( clone.getAttribute().contains( "test1" ) );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java?rev=1090163&r1=1090162&r2=1090163&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
Fri Apr  8 09:03:31 2011
@@ -62,14 +62,6 @@ public class DefaultModification impleme
     
     /**
      * Creates a new instance of DefaultModification.
-     */
-    public DefaultModification( AttributeType attributeType )
-    {
-        this.attributeType = attributeType;
-    }
-
-    /**
-     * Creates a new instance of DefaultModification.
      *
      * @param operation The modification operation
      * @param attribute The associated attribute 
@@ -83,21 +75,6 @@ public class DefaultModification impleme
     /**
      * Creates a new instance of DefaultModification.
      *
-     * @param attributeType The attributeType 
-     * @param operation The modification operation
-     * @param attribute The associated attribute 
-     */
-    public DefaultModification( AttributeType attributeType, ModificationOperation operation,
Attribute attribute )
-    {
-        this.attributeType = attributeType;
-        this.operation = operation;
-        this.attribute = attribute;
-    }
-    
-    
-    /**
-     * Creates a new instance of DefaultModification.
-     *
      * @param schemaManager The schema manager 
      * @param modification The modification
      */
@@ -136,9 +113,7 @@ public class DefaultModification impleme
     
     
     /**
-     * Store the modification operation
-     *
-     * @param operation The DirContext value to assign
+     * {@inheritDoc}
      */
     public void setOperation( int operation )
     {
@@ -165,9 +140,7 @@ public class DefaultModification impleme
     
     
     /**
-     * Set the attribute's modification
-     *
-     * @param attribute The modified attribute 
+     * {@inheritDoc}
      */
     public void setAttribute( Attribute attribute )
     {
@@ -190,7 +163,7 @@ public class DefaultModification impleme
 
 
     /**
-     * @return the attributeType
+     * {@inheritDoc}
      */
     public AttributeType getAttributeType()
     {
@@ -291,9 +264,7 @@ public class DefaultModification impleme
     
     
     /**
-     * Clone a modification
-     * 
-     * @return  a copied instance of the current modification
+     * {@inheritDoc}
      */
     public DefaultModification clone()
     {



Mime
View raw message