harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r768403 - in /harmony/enhanced/classlib/trunk/modules/jndi/src: main/java/javax/naming/CompositeName.java test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java
Date Fri, 24 Apr 2009 19:41:52 GMT
Author: tellison
Date: Fri Apr 24 19:41:51 2009
New Revision: 768403

URL: http://svn.apache.org/viewvc?rev=768403&view=rev
Log:
Apply patch for HARMONY-6100 ([classlib][jndi] CompositeName.toString() should not escape
"'")

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/CompositeName.java
    harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/CompositeName.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/CompositeName.java?rev=768403&r1=768402&r2=768403&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/CompositeName.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/CompositeName.java
Fri Apr 24 19:41:51 2009
@@ -326,12 +326,12 @@
                 buf.append("/"); //$NON-NLS-1$
             }
             if (elem.indexOf('/') < 0 && elem.indexOf('\\') < 0
-                    && elem.indexOf('\'') < 0 && elem.indexOf('"') <
0) {
+                    && elem.indexOf('"') < 0) {
                 buf.append(elem);
             } else {
                 char chars[] = elem.toCharArray();
                 for (char c : chars) {
-                    if (c == '/' || c == '\\' || c == '\'' || c == '"') {
+                    if (c == '/' || c == '\\' || c == '"') {
                         buf.append('\\');
                     }
                     buf.append(c);

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java?rev=768403&r1=768402&r2=768403&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/CompositeNameTest.java
Fri Apr 24 19:41:51 2009
@@ -150,6 +150,9 @@
 		assertEquals(new CompositeName(name.toString()), name);
 		assertNameEquals(name, new String[] { "www.apache.org", "gbank",
 				"", "abc\"abc", "abc/abc", "abc\\abc" });
+
+        assertEquals("test's", new CompositeName("test's").toString());
+        assertEquals("test", new CompositeName("'test'").toString());
 	}
 
 	/**



Mime
View raw message