directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1175803 - /directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
Date Mon, 26 Sep 2011 11:34:28 GMT
Author: pamarcelot
Date: Mon Sep 26 11:34:27 2011
New Revision: 1175803

URL: http://svn.apache.org/viewvc?rev=1175803&view=rev
Log:
Fixed a bug when adding entries from the input stream (Context entry was added several times).
Improved Javadoc.

Modified:
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java?rev=1175803&r1=1175802&r2=1175803&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
Mon Sep 26 11:34:27 2011
@@ -67,7 +67,7 @@ public class ReadOnlyConfigurationPartit
         super( schemaManager );
         this.inputStream = inputStream;
         id = "config";
-        
+
         try
         {
             suffixDn = new Dn( schemaManager, "ou=config" );
@@ -84,11 +84,11 @@ public class ReadOnlyConfigurationPartit
      */
     protected void doInit() throws InvalidNameException, Exception
     {
-        if ( ! initialized )
+        if ( !initialized )
         {
             // Initializing the wrapped partition
             super.doInit();
-    
+
             // Load LDIF entries
             loadLdifEntries();
         }
@@ -122,9 +122,8 @@ public class ReadOnlyConfigurationPartit
             if ( suffixDn.equals( contextEntry.getDn() ) )
             {
                 addMandatoryOpAt( contextEntry );
-                
-                AddOperationContext addContext = new AddOperationContext( null, contextEntry
);
-                super.add( addContext );
+
+                super.add( new AddOperationContext( null, contextEntry ) );
             }
             else
             {
@@ -136,9 +135,8 @@ public class ReadOnlyConfigurationPartit
             {
                 Entry entry = new DefaultEntry( schemaManager, itr.next().getEntry() );
                 addMandatoryOpAt( entry );
-                
-                AddOperationContext addContext = new AddOperationContext( null, contextEntry
);
-                super.add( addContext );
+
+                super.add( new AddOperationContext( null, entry ) );
             }
 
             // Closing the reader
@@ -175,7 +173,7 @@ public class ReadOnlyConfigurationPartit
      */
     public void add( AddOperationContext arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 
 
@@ -184,7 +182,7 @@ public class ReadOnlyConfigurationPartit
      */
     public void delete( Long arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 
 
@@ -193,7 +191,7 @@ public class ReadOnlyConfigurationPartit
      */
     public void modify( ModifyOperationContext arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 
 
@@ -202,7 +200,7 @@ public class ReadOnlyConfigurationPartit
      */
     public void move( MoveOperationContext arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 
 
@@ -211,7 +209,7 @@ public class ReadOnlyConfigurationPartit
      */
     public void moveAndRename( MoveAndRenameOperationContext arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 
 
@@ -220,6 +218,6 @@ public class ReadOnlyConfigurationPartit
      */
     public void rename( RenameOperationContext arg0 ) throws LdapException
     {
-        // Not implemented (Read-Only)
+        // Does nothing (Read-Only)
     }
 }



Mime
View raw message