Pankraz76 commented on code in PR #2304: URL: https://github.com/apache/maven/pull/2304#discussion_r2081386336
########## impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProcessor.java: ########## @@ -77,67 +80,69 @@ 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: unpleasant do prefix is fix for naming collision @elharo ########## impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProcessor.java: ########## @@ -77,67 +80,69 @@ 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: unpleasant `do` prefix is fix for naming collision @elharo -- 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