directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r729156 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Date Tue, 23 Dec 2008 22:36:26 GMT
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();
     }
 
 



Mime
View raw message