directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r506369 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Date Mon, 12 Feb 2007 08:24:43 GMT
Author: akarasulu
Date: Mon Feb 12 00:24:42 2007
New Revision: 506369

URL: http://svn.apache.org/viewvc?view=rev&rev=506369
Log:
again fixing common rendering problem when names are missing

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?view=diff&rev=506369&r1=506368&r2=506369
==============================================================================
--- 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
Mon Feb 12 00:24:42 2007
@@ -410,9 +410,18 @@
     public static StringBuffer render( ObjectClass oc ) throws NamingException
     {
         StringBuffer buf = new StringBuffer();
-        buf.append( "( " ).append( oc.getOid() ).append( " NAME " );
-        render( buf, oc.getNames() ).append( " " );
+        buf.append( "( " ).append( oc.getOid() );
 
+        if ( oc.getNames() != null && oc.getNames().length > 0 )
+        {
+            buf.append( " NAME " );
+            render( buf, oc.getNames() ).append( " " );
+        }
+        else
+        {
+            buf.append( " " );
+        }
+        
         if ( oc.getDescription() != null )
         {
             buf.append( "DESC " ).append( "'" ).append( oc.getDescription() ).append( "'
" );



Mime
View raw message