dcsimg
Bug in method toString() of javax.naming.CompoundName.java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marlen_Antonyan
Posted On:   Thursday, June 27, 2002 02:37 AM

Hi! I'm using j2se1.3.1, JNDI to access LDAP-directory. In JavaDocs of class javax.naming.CompoundName.java in description of toString() method written: public String toString() Generates the string representation of this compound name, using the syntax rules of the compound name. The syntax rules are described in the class description. An empty component is represented by an empty string. The string representation thus generated can be passed to the CompoundName constructor with the same syntax properties to create a new equivalent compound name. Overrides: toString in class Object Returns:    More>>

Hi!



I'm using j2se1.3.1, JNDI to access LDAP-directory.



In JavaDocs of class javax.naming.CompoundName.java
in description of toString() method written:



			
public String toString()

Generates the string representation of this compound name,
using the syntax rules of the compound name. The syntax
rules are described in the class description. An empty
component is represented by an empty string. The string
representation thus generated can be passed to the CompoundName
constructor with the same syntax properties to create a
new equivalent compound name.

Overrides:
toString in class Object
Returns:
A non-null string representation of this compound name.


However, when I set syntax rules property "jndi.syntax.trimblanks" to "true" ,
and after that when I create an instance of CompoundName for LDAP dn



"cn=SomeOne, ou=SomeUnit, o=Org" ,



toString() method returns



"cn=SomeOne, ou=SomeUnit, o=Org" ,



but, according to JavaDocs ( "Generates the string representation of this compound name,
using the syntax rules of the compound name"
) it must return



"cn=SomeOne,ou=SomeUnit,o=Org"



Please, if I wrong answer me what is my mistake.



Waiting for reply...



--
Best regards,
Marlen Antonyan (mailto:merelin@mail.ru)

   <<Less
About | Sitemap | Contact