Skip to content

Commit 05df7c3

Browse files
authored
Merge pull request #687 from cqse/ts/42354_non_matched_covered_probes
TS-42354 Delete erroneous info log
2 parents d430faa + d466ad9 commit 05df7c3

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ We use [semantic versioning](http://semver.org/):
77
# Next version
88
- [feature] _agent_: Experimental support for Java 25 class files
99
- [fix] _agent_: Reported wrong version number in docker container
10+
- [fix] _agent_: Erroneous log messages were printed about unmatched probes
1011

1112
# 35.0.3
1213
- [fix] _teamscale-gradle-plugin_: `IllegalArgumentException`: Can't execute request without discovering it first

report-generator/src/main/kotlin/com/teamscale/report/testwise/jacoco/cache/ClassCoverageLookup.kt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,15 @@ class ClassCoverageLookup internal constructor(
5656

5757
private fun fillFileCoverage(fileCoverage: FileCoverageBuilder, executedProbes: BooleanArray, logger: ILogger) {
5858
probes.forEach { (probeId, coveredLines) ->
59-
if (executedProbes.getOrNull(probeId) == true) {
60-
when {
61-
coveredLines.isEmpty -> logger.debug(
62-
"$sourceFileName $className contains a method with no line information. Does the class contain debug information?"
63-
)
64-
65-
else -> fileCoverage.addLines(coveredLines)
66-
}
67-
} else {
68-
logger.info(
69-
"$sourceFileName $className contains a covered probe $probeId that could not be matched to any method. " +
70-
"This could be a bug in the profiler tooling. Please report it back to CQSE."
59+
if (!executedProbes[probeId]) {
60+
return@forEach
61+
}
62+
when {
63+
coveredLines.isEmpty -> logger.debug(
64+
"$sourceFileName $className contains a method with no line information. Does the class contain debug information?"
7165
)
66+
67+
else -> fileCoverage.addLines(coveredLines)
7268
}
7369
}
7470
}

0 commit comments

Comments
 (0)