harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r549309 - 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 Thu, 21 Jun 2007 00:47:07 GMT
Author: tonywu
Date: Wed Jun 20 17:47:06 2007
New Revision: 549309

URL: http://svn.apache.org/viewvc?view=rev&rev=549309
Log:
Apply patch HARMONY-4243 ([classlib][jndi] Class LdapName.endsWith() has some failures)

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=549309&r1=549308&r2=549309
==============================================================================
--- 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 Jun 20 17:47:06 2007
@@ -204,7 +204,7 @@
     public boolean endsWith(List<Rdn> rdns) {
         try {
             Iterator<?> iter = rdns.iterator();
-            Iterator<?> iter2 = ((LdapName) getSuffix(rdns.size()
+            Iterator<?> iter2 = ((LdapName) getSuffix(this.rdns.size()
                     - rdns.size())).rdns.iterator();
 
             while (iter.hasNext()) {

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=549309&r1=549308&r2=549309
==============================================================================
--- 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 Jun 20 17:47:06 2007
@@ -2268,6 +2268,24 @@
 
     /**
      * <p>
+     * Test method for 'javax.naming.ldap.LdapName.endsWith(List<Rdn>)'
+     * </p>
+     * <p>
+     * Here we are testing if this method determines whether the specified RDN
+     * sequence forms a suffix of this LDAP name.
+     * </p>
+     * <p>
+     * The expected result is if a non null list of Rdns is sended, is a true.
+     * </p>
+     */
+    public void testEndsWithListOfRdn007() throws Exception {
+        LinkedList<Rdn> test = new LinkedList<Rdn>();
+        test.add(new Rdn("t3=test3"));
+        assertTrue(new LdapName("t3=test3,t2=test2,t=test").endsWith(test));
+    }
+
+    /**
+     * <p>
      * Test method for 'javax.naming.ldap.LdapName.addAll(Name)'
      * </p>
      * <p>



Mime
View raw message