gnodet commented on code in PR #2292: URL: https://github.com/apache/maven/pull/2292#discussion_r2080518601
########## impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProcessor.java: ########## @@ -77,17 +79,19 @@ public DefaultModelProcessor(ModelXmlFactory modelXmlFactory, @Nullable List<Mod this.modelParsers = modelParsers; } + /** + * @implNote + * The ModelProcessor#locatePom never returns null while the ModelParser#locatePom needs to return an existing path! + */ @Override public Path locateExistingPom(Path projectDirectory) { - // Note that the ModelProcessor#locatePom never returns null - // while the ModelParser#locatePom needs to return an existing path! Path pom = modelParsers.stream() .map(m -> m.locate(projectDirectory) .map(org.apache.maven.api.services.Source::getPath) .orElse(null)) .filter(Objects::nonNull) .findFirst() - .orElseGet(() -> doLocateExistingPom(projectDirectory)); Review Comment: You changed the semantics, it's wrong. -- 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