gnodet-bot commented on code in PR #13959:
URL: https://github.com/apache/maven/pull/13959#discussion_r4552827151


##########
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java:
##########
@@ -703,11 +703,11 @@ private Model readModel(
 
                 if (pomFile != null) {
                     problems.add(new 
ModelProblemCollectorRequest(Severity.ERROR, Version.V20)
-                            .setMessage("Malformed POM " + 
modelSource.getLocation() + ": " + e.getMessage())
+                            .setMessage("Invalid POM " + 
modelSource.getLocation() + ": " + e.getMessage())
                             .setException(e));

Review Comment:
   💡 **Suggestion:** Companion PRs #13953 and #13958 add an explanatory comment 
before this `if (pomFile != null)` block documenting the distinction between 
"Invalid" (well-formed XML with semantic issues) and 
"Malformed"/"Non-parseable" (bad XML). This PR should add the same comment here 
for consistency.



##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java:
##########
@@ -1872,7 +1872,7 @@ Model doReadFileModel(Set<Path> activeModelReads) throws 
ModelBuilderException {
                         add(
                                 Severity.ERROR,
                                 Version.V20,
-                                "Malformed POM " + modelSource.getLocation() + 
": " + e.getMessage(),
+                                "Invalid POM " + modelSource.getLocation() + 
": " + e.getMessage(),
                                 e);

Review Comment:
   💡 **Suggestion:** Same as above — companion PRs #13953 and #13958 add an 
explanatory comment at this location. Please add one here as well, explaining 
that this branch handles well-formed but semantically invalid POMs (not XML 
parse failures).



-- 
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]

Reply via email to