Skip to content

Commit 894abe5

Browse files
Pankraz76Vincent Potucek
andauthored
Issue #11109: Avoid NPE using ProjectId (#11178)
Co-authored-by: Vincent Potucek <vpotucek@me.com>
1 parent 033bf6f commit 894abe5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

impl/maven-core/src/main/java/org/apache/maven/project/collector/DefaultProjectsSelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public List<MavenProject> selectProjects(List<File> files, MavenExecutionRequest
7575
"{} {} encountered while building the effective model for '{}' (use -e to see details)",
7676
problemsCount,
7777
(problemsCount == 1) ? "problem was" : "problems were",
78-
result.getProject().getId());
78+
result.getProjectId());
7979

8080
if (request.isShowErrors()) { // this means -e or -X (as -X enables -e as well)
8181
for (ModelProblem problem : result.getProblems()) {

its/core-it-suite/src/test/resources/mng-5208/spy/src/main/java/mng5208/EventLoggerSpy.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public void onEvent(Object event) throws Exception {
3434
if (event instanceof ExecutionEvent) {
3535

3636
ExecutionEvent executionEvent = (ExecutionEvent) event;
37-
System.out.println("executionEvent:" + executionEvent.getType() + "/"
38-
+ executionEvent.getProject().getId());
37+
System.out.println("executionEvent:" + executionEvent.getType() + "/" + executionEvent.getProjectId());
3938
}
4039
}
4140
}

0 commit comments

Comments
 (0)