gnodet-bot commented on code in PR #13667:
URL: https://github.com/apache/maven/pull/13667#discussion_r4343233352
##########
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlanExecutor.java:
##########
@@ -526,7 +526,7 @@ private void executeStep(BuildStep step) throws
IOException, LifecycleExecutionE
List<Throwable> failures = null;
boolean allWorkExecuted = true;
for (BuildStep projectStep :
plan.steps(step.project).toList()) {
- Exception exception = projectStep.exception;
+ Throwable exception = projectStep.exception;
Review Comment:
🔧 **Unrelated change:** Widening `Exception` → `Throwable` and adding a
missing newline-at-EOF are both correctness improvements, but they're unrelated
to the warning-mode feature. These would be cleaner as a separate commit (or
PR) so the feature change stays focused and cherry-picks are clean.
##########
impl/maven-core/src/main/java/org/apache/maven/logging/ProjectBuildLogAppender.java:
##########
@@ -141,9 +141,19 @@ public static void setReportCapture(Consumer<LogEvent>
capture) {
}
private final BuildEventListener buildEventListener;
+ private final boolean suppressInlineWarnings;
- public ProjectBuildLogAppender(BuildEventListener buildEventListener) {
+ /**
+ * Creates a new appender that forwards log events to the given listener.
+ *
+ * @param buildEventListener the listener to forward events to
+ * @param warningMode the warning display mode ({@code "summary"}, {@code
"all"},
+ * {@code "none"}, {@code "fail"}); {@code "summary"}
suppresses
+ * inline WARN events while preserving them for the
build report
+ */
Review Comment:
💡 **Documentation gap:** The Javadoc lists `"summary"`, `"all"`, `"none"`,
`"fail"` but does not document what happens when `warningMode` is `null`. The
constructor currently silently treats `null` as non-summary (since
`"summary".equalsIgnoreCase(null)` returns `false`), but callers relying on
this behavior have no contract to lean on.
Consider adding:
```suggestion
* @param warningMode the warning display mode ({@code "summary"},
{@code "all"},
* {@code "none"}, {@code "fail"}); {@code "summary"}
suppresses
* inline WARN events while preserving them for the
build report;
* {@code null} is treated as non-summary (all events
flow inline)
*/
```
--
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]