directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r506296 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Date Mon, 12 Feb 2007 05:47:25 GMT
Author: akarasulu
Date: Sun Feb 11 21:47:24 2007
New Revision: 506296

URL: http://svn.apache.org/viewvc?view=rev&rev=506296
Log:
fixed problem with rendering an attributeTypeDescription when it has no names

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=506296&r1=506295&r2=506296
==============================================================================
--- 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
Sun Feb 11 21:47:24 2007
@@ -520,8 +520,17 @@
     public static StringBuffer render( AttributeType at ) throws NamingException
     {
         StringBuffer buf = new StringBuffer();
-        buf.append( "( " ).append( at.getOid() ).append( " NAME " );
-        render( buf, at.getNames() ).append( " " );
+        buf.append( "( " ).append( at.getOid() );
+        
+        if ( at.getNames() != null && at.getNames().length > 0 )
+        {
+            buf.append( " NAME " );
+            render( buf, at.getNames() ).append( " " );
+        }
+        else
+        {
+            buf.append( " " );
+        }
 
         if ( at.getDescription() != null )
         {



Mime
View raw message