Skip to content

Commit 793a0e7

Browse files
Fix NullPointerException in Jacoco coverage report merge logic (#9803)
1 parent ad9b373 commit 793a0e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/coverage/report/JacocoCoverageProcessor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@ private long mergeAndUploadCoverageReport(IBundleCoverage coverageBundle) {
445445
continue;
446446
}
447447

448+
if (pathRelativeToIndexRoot == null) {
449+
LOGGER.debug("Could not resolve source for path {}", pathRelativeToSourceRoot);
450+
continue;
451+
}
452+
448453
LinesCoverage linesCoverage = getLinesCoverage(sourceFile);
449454
// backendCoverageData contains data for all modules in the repo,
450455
// but coverageBundle bundle only has source files that are relevant for the given module,

0 commit comments

Comments
 (0)