fix: Publish clover coverage in CI: "Invalid input stream" (OD-2579)

This commit is contained in:
Robin Shen 2025-10-18 17:08:45 +08:00
parent db28406eeb
commit 64e83d995b

View File

@ -57,6 +57,8 @@ public class CloverReportParser {
Map<String, Map<Integer, CoverageStatus>> coverageStatuses = new HashMap<>(); Map<String, Map<Integer, CoverageStatus>> coverageStatuses = new HashMap<>();
for (Element fileElement : fileElements) { for (Element fileElement : fileElements) {
var filePath = fileElement.attributeValue("path"); var filePath = fileElement.attributeValue("path");
if (filePath == null)
filePath = fileElement.attributeValue("name");
String blobPath = build.getBlobPath(filePath); String blobPath = build.getBlobPath(filePath);
if (blobPath != null) { if (blobPath != null) {
var metricsElement = fileElement.element("metrics"); var metricsElement = fileElement.element("metrics");