Commit aaec686e by Tom Tromey Committed by Michael Koch

CompoundName.java (endsWith): Look at correct element of source name.

2004-05-05  Tom Tromey  <tromey@redhat.com>

	* javax/naming/CompoundName.java (endsWith): Look at correct
	element of source name.

From-SVN: r81513
parent b1210ca2
2004-05-05 Tom Tromey <tromey@redhat.com>
* javax/naming/CompoundName.java (endsWith): Look at correct
element of source name.
2004-05-05 Mark Wielaard <mark@klomp.org> 2004-05-05 Mark Wielaard <mark@klomp.org>
Reported by f.haeglsperger@gmx.de [classpath patch #2485] Reported by f.haeglsperger@gmx.de [classpath patch #2485]
......
...@@ -264,7 +264,7 @@ public class CompoundName implements Name, Cloneable, Serializable ...@@ -264,7 +264,7 @@ public class CompoundName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size (); int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i) for (int i = 0; i < cn.elts.size (); ++i)
{ {
String f = canonicalize ((String) elts.get (i)); String f = canonicalize ((String) elts.get (delta + i));
if (! f.equals (canonicalize ((String) cn.elts.get (i)))) if (! f.equals (canonicalize ((String) cn.elts.get (i))))
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment