gnodet commented on code in PR #744: URL: https://github.com/apache/maven/pull/744#discussion_r875960387
########## maven-model-transform/src/test/java/org/apache/maven/model/transform/ParentXMLFilterTest.java: ########## @@ -33,30 +33,55 @@ public class ParentXMLFilterTest extends AbstractXMLFilterTests { - private Function<XmlPullParser, ParentXMLFilter> filterCreator; + private Function<XmlPullParser, XmlPullParser> filterCreator; @BeforeEach void reset() { filterCreator = null; } @Override - protected ParentXMLFilter getFilter( XmlPullParser parser ) + protected XmlPullParser getFilter( XmlPullParser parser ) { - Function<XmlPullParser, ParentXMLFilter> filterCreator = + Function<XmlPullParser, XmlPullParser> filterCreator = (this.filterCreator != null ? this.filterCreator : this::createFilter); return filterCreator.apply(parser); } - protected ParentXMLFilter createFilter( XmlPullParser parser ) { + protected XmlPullParser createFilter( XmlPullParser parser ) { return createFilter( parser, x -> Optional.of(new RelativeProject("GROUPID", "ARTIFACTID", "1.0.0")), Paths.get( "pom.xml").toAbsolutePath() ); } - protected ParentXMLFilter createFilter( XmlPullParser parser, Function<Path, Optional<RelativeProject>> pathMapper, Path projectPath ) { + protected XmlPullParser createFilter( XmlPullParser parser, Function<Path, Optional<RelativeProject>> pathMapper, Path projectPath ) { ParentXMLFilter filter = new ParentXMLFilter( parser, pathMapper, projectPath ); - return filter; + return new FastForwardFilter( filter ); + } + + @Test + public void testWithFastForward() Review Comment: I've added a test with a bypass section and a section which should not be bypassed after. It was actually failing, so I had to fix it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org