diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java index 297afa7ac4..bf865b25a7 100644 --- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java +++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java @@ -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;