harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r538565 - in /harmony/enhanced/classlib/trunk/modules/jndi/src: main/java/javax/naming/ldap/LdapName.java test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java
Date Wed, 16 May 2007 12:38:19 GMT
Author: pyang
Date: Wed May 16 05:38:18 2007
New Revision: 538565

URL: http://svn.apache.org/viewvc?view=rev&rev=538565
Log:
Apply patch for HARMONY-3879([classlib][jndi] Method size() of class javax.naming.ldap.LdapName
return different value from RI)

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
    harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java?view=diff&rev=538565&r1=538564&r2=538565
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/LdapName.java
Wed May 16 05:38:18 2007
@@ -50,7 +50,7 @@
                     + Messages.getString("ldap.00"));
         }
 
-        this.rdns = rdns;
+        this.rdns = new ArrayList(rdns);
     }
 
     /**

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java?view=diff&rev=538565&r1=538564&r2=538565
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java
Wed May 16 05:38:18 2007
@@ -2768,6 +2768,27 @@
 
     /**
      * <p>
+     * Test method for 'javax.naming.ldap.LdapName.add(String)'
+     * </p>
+     * <p>
+     * Here we are testing if this method adds a single component to the end of
+     * this LDAP name.
+     * </p>
+     * <p>
+     * The expected result is the adding of the single component.
+     * </p>
+     */
+    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());
+    }
+
+    /**
+     * <p>
      * Test method for 'javax.naming.ldap.LdapName.add(Rdn)'
      * </p>
      * <p>



Mime
View raw message