Pankraz76 commented on code in PR #2304:
URL: https://github.com/apache/maven/pull/2304#discussion_r2079127763
##########
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;
}
+ return project;
}
- private Model doRead(XmlReaderRequest request) throws IOException {
Review Comment:
This is `wrong/counterfeit` because:
> Currently, the API is designed to throw XmlReaderException. Check the
implemented interface, there's no IOException thrown here.
>
> >
https://github.com/apache/maven/pull/2292#issuecomment-2860229309
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]