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 2008/12/23 23:36:26 UTC

svn commit: r729156 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java

Author: elecharny
Date: Tue Dec 23 14:36:25 2008
New Revision: 729156

URL: http://svn.apache.org/viewvc?rev=729156&view=rev
Log:
Added some javadoc, and return a String instead of a StringBuffer

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=729156&r1=729155&r2=729156&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java Tue Dec 23 14:36:25 2008
@@ -976,9 +976,17 @@
     }
 
 
-    public static StringBuffer render( AbstractAdsSchemaDescription description )
+    /**
+     * Returns a String description of a schema. The resulting String format is :
+     * <br>
+     * (OID [DESC '<description>'] FQCN <fcqn> [BYTECODE <bytecode>] X-SCHEMA '<schema>')
+     * <br>
+     * @param description The description to transform to a String
+     * @return
+     */
+    public static String render( AbstractAdsSchemaDescription description )
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append( "( " ).append( description.getNumericOid() ).append( " " );
 
         if ( description.getDescription() != null )
@@ -997,7 +1005,7 @@
         buf.append( getSchema( description ) );
         buf.append( "' )" );
 
-        return buf;
+        return buf.toString();
     }