directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r506190 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Date Mon, 12 Feb 2007 00:29:03 GMT
Author: akarasulu
Date: Sun Feb 11 16:29:02 2007
New Revision: 506190

URL: http://svn.apache.org/viewvc?view=rev&rev=506190
Log:
fixing nasty problem when a matchingRule does not have an optional name

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=506190&r1=506189&r2=506190
==============================================================================
--- 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 16:29:02 2007
@@ -643,8 +643,17 @@
     public static StringBuffer render( MatchingRule mr ) throws NamingException
     {
         StringBuffer buf = new StringBuffer();
-        buf.append( "( " ).append( mr.getOid() ).append( " NAME " );
-        render( buf, mr.getNames() ).append( " " );
+        buf.append( "( " ).append( mr.getOid() );
+        
+        if ( mr.getNames() != null && mr.getNames().length > 0 )
+        {
+            buf.append( " NAME " );
+            render( buf, mr.getNames() ).append( " " );
+        }
+        else
+        {
+            buf.append( " " );
+        }
 
         if ( mr.getDescription() != null )
         {



Mime
View raw message