harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r540864 - in /harmony/enhanced/classlib/trunk/modules/jndi/src: main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java
Date Wed, 23 May 2007 07:05:08 GMT
Author: pyang
Date: Wed May 23 00:05:07 2007
New Revision: 540864

URL: http://svn.apache.org/viewvc?view=rev&rev=540864
Log:
Apply patch for HARMONY-3887([classlib][jndi] Method size() of class Rdn will throw Exception
when RI passes)

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java
    harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java?view=diff&rev=540864&r1=540863&r2=540864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/RelaxedDnParser.java
Wed May 23 00:05:07 2007
@@ -92,6 +92,10 @@
             }
             pos++;
         }
+        
+        while (end > beg+1 && chars[end - 1] == ' ') {
+            end--;
+        }
 
         // verify length of hex string
         // encoded byte array must be even number

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java?view=diff&rev=540864&r1=540863&r2=540864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/RdnTest.java
Wed May 23 00:05:07 2007
@@ -1709,6 +1709,23 @@
 
     /**
      * <p>
+     * Test method for 'javax.naming.ldap.Rdn.size()'
+     * </p>
+     * <p>
+     * Here we are testing if the return of this method is the correct size of
+     * the given Rdn wich has three names.
+     * </p>
+     * <p>
+     * The expected result is an integer with the value of three.
+     * </p>
+     */
+    public void testSize004() throws Exception {
+        Rdn rdn = new Rdn("t = #20 ");
+        assertEquals(1, rdn.size());
+    }
+
+    /**
+     * <p>
      * Test method for 'javax.naming.ldap.Rdn.escapeValue(Object)'
      * </p>
      * <p>



Mime
View raw message