Skip to content

Commit e81bc25

Browse files
committed
Avoid failing when JaCoCo can't instrument a class
Fixes #49238 (cherry picked from commit 5cd6147)
1 parent d1199be commit e81bc25

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test-framework/jacoco/deployment/src/main/java/io/quarkus/jacoco/deployment/JacocoProcessor.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ public byte[] apply(String className, byte[] bytes) {
9090
}
9191
return enhanced;
9292
} catch (IOException e) {
93-
throw new RuntimeException(e);
93+
if (!log.isDebugEnabled()) {
94+
log.warnf(
95+
"Unable to instrument class %s with JaCoCo: %s, keeping the original class",
96+
className, e.getMessage());
97+
} else {
98+
log.warnf(e,
99+
"Unable to instrument class %s with JaCoCo, keeping the original class",
100+
className);
101+
}
102+
return bytes;
94103
}
95104
}
96105
}).build());

0 commit comments

Comments
 (0)