Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72090] Fixed NullPointerException during reporting #318

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/java/hudson/maven/AbstractMavenBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@
void end(Launcher launcher) throws IOException, InterruptedException {
for (Map.Entry<ModuleName,ProxyImpl2> e : sourceProxies.entrySet()) {
ProxyImpl2 p = e.getValue();
for (MavenReporter r : reporters.get(e.getKey())) {
ModuleName module = e.getKey();
List<MavenReporter> moduleReporters = reporters.get(module);
if (moduleReporters == null) {

Check warning on line 103 in src/main/java/hudson/maven/AbstractMavenBuilder.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 103 is only partially covered, one branch is missing
// Safety: Key set of reporter and source list has become inconsistent.
continue;

Check warning on line 105 in src/main/java/hudson/maven/AbstractMavenBuilder.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 105 is not covered by tests
}
for (MavenReporter r : moduleReporters) {
// we'd love to do this when the module build ends, but doing so requires
// we know how many task segments are in the current build.
r.end(p.owner(),launcher,listener);
Expand Down