Fix possible NullPointerException

This commit is contained in:
Guillaume Nodet
2022-11-23 09:35:22 +01:00
parent fbf6dd16cb
commit bbffbd3651

View File

@@ -720,7 +720,10 @@ public class DaemonMavenCli {
logSummary(summary, references, "", cliRequest.showErrors);
if (exception instanceof LifecycleExecutionException) {
failedProjects.add(((LifecycleExecutionException) exception).getProject());
MavenProject project = ((LifecycleExecutionException) exception).getProject();
if (project != null) {
failedProjects.add(project);
}
}
}