Index: modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java =================================================================== --- modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java (revision 538452) +++ modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java (working copy) @@ -2768,6 +2768,27 @@ /** *

+ * Test method for 'javax.naming.ldap.LdapName.add(String)' + *

+ *

+ * Here we are testing if this method adds a single component to the end of + * this LDAP name. + *

+ *

+ * The expected result is the adding of the single component. + *

+ */ + public void testAddString007() throws Exception { + LinkedList ll = new LinkedList(); + ll.add(new Rdn("t=test")); + LdapName ln = new LdapName(ll); + ln.add("t1=test1"); + ll.remove(0); + assertEquals(2, ln.size()); + } + + /** + *

* Test method for 'javax.naming.ldap.LdapName.add(Rdn)' *

*

Index: modules/jndi/src/main/java/javax/naming/ldap/LdapName.java =================================================================== --- modules/jndi/src/main/java/javax/naming/ldap/LdapName.java (revision 538452) +++ modules/jndi/src/main/java/javax/naming/ldap/LdapName.java (working copy) @@ -50,7 +50,7 @@ + Messages.getString("ldap.00")); } - this.rdns = rdns; + this.rdns = new ArrayList(rdns); } /**