Compare Xpp3Dom instances not objects that are different types and are being compared by Object.equals i.e. instance identity

This commit is contained in:
Stephen Connolly 2014-01-06 11:00:47 +00:00
parent 4b6eaadd28
commit e2b7ea2a96
1 changed files with 2 additions and 1 deletions

View File

@ -63,9 +63,10 @@ class Xpp3DomNodeIterator
this.children = this.node.getChildren();
if ( startWith != null )
{
Xpp3Dom startWithNode = (Xpp3Dom) startWith.getNode();
for ( ; filteredIndex < children.length; filteredIndex++ )
{
if ( startWith.equals( children[filteredIndex] ) )
if ( startWithNode.equals( children[filteredIndex] ) )
{
filteredIndex++;
break;