Fix possible NullPointerException

This commit is contained in:
Guillaume Nodet
2022-11-23 09:35:22 +01:00
parent 43d1ba2de8
commit d1d3cb0f65

View File

@@ -714,7 +714,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);
}
}
}