gnodet commented on code in PR #2304: URL: https://github.com/apache/maven/pull/2304#discussion_r2080223658
########## impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProcessor.java: ########## @@ -126,18 +126,14 @@ public Model read(XmlReaderRequest request) throws IOException { private Path doLocateExistingPom(Path project) { if (project == null) { project = Paths.get(System.getProperty("user.dir")); - } - if (Files.isDirectory(project)) { + } else if (Files.isDirectory(project)) { Path pom = project.resolve("pom.xml"); return Files.isRegularFile(pom) ? pom : null; - } else if (Files.isRegularFile(project)) { - return project; - } else { - return null; Review Comment: The fact it's hard to test does not mean the case does not exist. -- 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