-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
BugBug issue typeBug issue typeS: ready for releaseStatus: merged in the main branchStatus: merged in the main branch
Description
Describe the bug
When using try-with-resources in a Java class, some lines are marked as partially covered in the generated report.
Expected behavior
All lines should be fully covered (green in HTML report)
Reproducer
Java class
public final class TryWithResources {
private TryWithResources() {}
public static void test() throws Exception {
final AutoCloseable autoCloseable = new AutoCloseable() {
@Override
public void close() {
System.out.println("closed");
}
};
try (autoCloseable) {
System.out.println("action");
}
}
}Reports
when calling the test method, the following coverage report is generated

Environment
- IntelliJ agent
1.0.754
Metadata
Metadata
Assignees
Labels
BugBug issue typeBug issue typeS: ready for releaseStatus: merged in the main branchStatus: merged in the main branch