directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1043405 - /directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
Date Wed, 08 Dec 2010 13:22:39 GMT
Author: pamarcelot
Date: Wed Dec  8 13:22:39 2010
New Revision: 1043405

URL: http://svn.apache.org/viewvc?rev=1043405&view=rev
Log:
Special handling for boolean values which are stored as uppercased Strings (TRUE or FALSE).

Modified:
    directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java

Modified: directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java?rev=1043405&r1=1043404&r2=1043405&view=diff
==============================================================================
--- directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
(original)
+++ directory/apacheds/branches/server-config-annotations/server-config/src/main/java/org/apache/directory/server/config/ConfigWriter.java
Wed Dec  8 13:22:39 2010
@@ -155,7 +155,8 @@ public class ConfigWriter
         }
         writer.close();
     }
-    
+
+
     /**
      * Gets the converted LDIF entries from the configuration bean.
      *
@@ -168,7 +169,7 @@ public class ConfigWriter
     {
         // Converting the configuration bean to a list of LDIF entries
         convertConfigurationBeanToLdifEntries();
-        
+
         // Returning the list of entries
         return entries;
     }
@@ -583,10 +584,16 @@ public class ConfigWriter
                 // Value is a byte[]
                 attribute.add( ( byte[] ) value );
             }
+            // Storing the boolean value in UPPERCASE (TRUE or FALSE) to the attribute
+            else if ( value instanceof Boolean )
+            {
+                // Value is a byte[]
+                attribute.add( value.toString().toUpperCase() );
+            }
             else
             {
                 // Value is another type of object that we store as a String
-                // (There will be an automatic translation for primary types like int, long,
boolean, etc.)
+                // (There will be an automatic translation for primary types like int, long,
etc.)
                 attribute.add( value.toString() );
             }
         }



Mime
View raw message