Mozilla Bug #640750 - LDAPSchemaElement.getOptionalValues() mangles values (Thu Mar 31 2011 Rich Megginson <rmeggins@redhat.com> 0:4.18-8)
authorMatthew Harmsen <mharmsen@redhat.com>
Thu, 09 Mar 2017 16:15:49 -0700
changeset 49 82bc79df3919
parent 48 a34932a9856f
child 50 c07685b0f90a
push id33
push userrichm@stanfordalumni.org
push dateFri, 10 Mar 2017 00:40:48 +0000
bugs640750
Mozilla Bug #640750 - LDAPSchemaElement.getOptionalValues() mangles values (Thu Mar 31 2011 Rich Megginson <rmeggins@redhat.com> 0:4.18-8)
java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java
--- a/java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java
+++ b/java-sdk/ldapjdk/netscape/ldap/LDAPSchemaElement.java
@@ -539,16 +539,20 @@ public abstract class LDAPSchemaElement 
      * @return String in RFC 2252 format containing any values
      * found, not terminated with ' '.
      */
     protected String getOptionalValues( String[] names ) {
         String s = "";
         for( int i = 0; i < names.length; i++ ) {
             String[] vals = getQualifier( names[i] );
             if ( (vals != null) && (vals.length > 0) ) {
+                // need a space between elements
+                if (i > 0) {
+                    s += ' ';
+                }
                 s += names[i] + ' ' + vals[0];
             }
         }
         return s;
     }
 
     /**
      * Gets any qualifiers marked as custom (starting with "X-")